@php Theme::set('pageName', SeoHelper::getTitle()) @endphp
@if (Cart::instance('compare')->count()) @php $withCount = []; if (EcommerceHelper::isReviewEnabled()) { $withCount = [ 'reviews', 'reviews as reviews_avg' => function ($query) { $query->select(DB::raw('avg(star)')); }, ]; } $products = app(\Botble\Ecommerce\Repositories\Interfaces\ProductInterface::class)->advancedGet([ 'condition' => [ ['ec_products.id', 'IN', Cart::instance('compare')->content()->pluck('id')->all()], 'ec_products.status' => \Botble\Base\Enums\BaseStatusEnum::PUBLISHED, ], 'with' => [ 'variations', 'productCollections', 'variationAttributeSwatchesForProductList', 'promotions', 'latestFlashSales', ], 'withCount' => $withCount, ]); @endphp
@foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @endif @endforeach @foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @endif @endforeach @foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @endif @endforeach @if (EcommerceHelper::isReviewEnabled()) @foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @endif @endforeach @endif @foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @endif @endforeach @php $attributeSets = app(\Botble\Ecommerce\Repositories\Interfaces\ProductAttributeSetInterface::class)->getAllWithSelected(Cart::instance('compare')->content()->pluck('id')); @endphp @foreach($attributeSets as $attributeSet) @foreach(Cart::instance('compare')->content() as $item) @php $product = $products->find($item->id); @endphp @if (!empty($product)) @php $attributes = app(\Botble\Ecommerce\Repositories\Interfaces\ProductInterface::class)->getRelatedProductAttributes($product)->where('attribute_set_id', $attributeSet->id)->sortBy('order'); @endphp @if ($attributes->count()) @if ($attributeSet->display_layout == 'dropdown') @elseif ($attributeSet->display_layout == 'text') @else @endif @else @endif @endif @endforeach @endforeach @if (EcommerceHelper::isCartEnabled()) @foreach(Cart::instance('compare')->content() as $item) @endforeach @endif @foreach(Cart::instance('compare')->content() as $item) @endforeach
Product Image {{ $product->name }}
Product Name
{{ $product->name }}
Price {{ format_price($product->front_sale_price_with_taxes) }} @if ($product->front_sale_price !== $product->price) {{ format_price($product->price_with_taxes) }} ({{ get_sale_percentage($product->price, $product->front_sale_price) }}) @endif
{{ __('Rating') }}
({{ $product->reviews_count }})
{{ __('Description') }}

{!! clean($product->description) !!}

{{ $attributeSet->title }} @foreach($attributes as $attribute) {{ $attribute->title }}@if (!$loop->last), @endif @endforeach
    @foreach($attributes as $attribute)
  • @endforeach
    @foreach($attributes as $attribute)
  • @endforeach
{{ __('Buy now') }} {{ __('Add To Cart') }}
{{ __('Remove') }}
@else

{{ __('No products in compare list!') }}

@endif