@extends('site.layouts.app') @section('page_title', __('Product Compare List')) @section('seo') @endsection @section('content')
{{-- breadcrumbs --}}
@php $index = 1 @endphp @foreach ($compareProducts['productName'] as $key => $productName) @endforeach @foreach ($compareProducts['price'] as $key => $price) @endforeach @foreach ($compareProducts['availability'] as $key => $av) @endforeach @foreach ($compareProducts['summary'] as $key => $summary) @endforeach @foreach ($compareProducts['rating'] as $key => $rating) @endforeach @foreach ($compareProducts['category'] as $key => $category) @endforeach @foreach ($compareProducts['sku'] as $key => $sku) @endforeach @php $cnt = 0 ; $totalAttribute = count($compareProducts['productAttributeValuesCheck']); $productIds = array_keys($compareProducts['category']); @endphp @foreach ($compareProducts['productAttributeValuesCheck'] as $key2 => $values) @if($totalAttribute / 2 == 0) @else @endif @php $cnt++ ; $valuesOrderWise = []; foreach($productIds as $id) { $valuesOrderWise[$id] = $values[$id]; } @endphp @foreach ($valuesOrderWise as $key3 => $val) @endforeach @endforeach @foreach ($compareProducts['brand'] as $key => $brand) @endforeach @php $userId = isset(Auth::user()->id) ? Auth::user()->id : null @endphp @foreach ($compareProducts['productName'] as $key => $productName) @endforeach
{{ __('Products') }}
product image
{{ trimWords($productName['name'], 25) }}
{{ __('Price') }} {{ $price }}
{{ __('Availability') }} {{ $av == true ? __('Available') : __('Not Available') }}
{{ __('Summary') }} {{ $summary }}
{{ __('Rating & Reviews') }}
@if($rating > 0) @for($i = 1; $i <= 5; $i++) @if ($rating >= $i) @else @endif @endfor ({{ $compareProducts['ratingCount'][$key] ?? 0 }} {{ __('Reviews') }}) @else {{ __('Not reviewed yet') }} @endif
{{ __('Category') }}{{ $category }}
{{ __('SKU') }}{{ $sku }}
{{ $key2 }}{{ $val }}
{{ __('Brand') }}{{ $brand }}
{{ __('Actions') }}
@php $wishlisted = false; if (auth()->user()) { $wishlisted = $product->isWishlist($key, optional(auth()->user())->id); } @endphp @if (preference('wishlist'))
{{ !$wishlisted ? __('Add to wishlist') : __('In wishlist') }}
@endif @if($productName['type'] != 'Variable Product') @php $inCart = \Cart::cartCollection()->where('id', $key)->first(); @endphp @if($productName['type'] == 'Grouped Product') {{ __('View') }} @else
@if($productName['stockStatus']['outOfStockVisibility'] != 1 ) {{ empty($inCart) ? __('Add to cart') : __('In cart') }} @else {{ __('Stock Out') }} @endif
@endif @else {{ __('Quick View') }} @endif
{{ __('Image') }}
{{ __('There are no products added for comparison yet.') }} {{ __('To compare products') }}, {{ __('Image') }} {{ __('click on the button on the product page') }}.
@endsection @section('js') @endsection