Viewing file: compare.blade.php (6 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('master.front')
@section('title') {{__('Compare')}} @endsection @section('meta') <meta name="keywords" content="{{$setting->meta_keywords}}"> <meta name="description" content="{{$setting->meta_description}}"> @endsection @section('content') <!-- Page Title--> <div class="page-title"> <div class="container"> <div class="row"> <div class="col-lg-12"> <ul class="breadcrumbs"> <li><a href="{{route('front.index')}}">{{__('Home')}}</a> </li> <li class="separator"></li> <li>{{__('Compare Products')}}</li> </ul> </div> </div> </div> </div> <!-- Page Content--> <div class="container padding-bottom-3x mb-1"> <div class="card"> <div class="card-body"> <div class="comparison-card-sec"> <div class="row"> @if(count($items) > 0) @foreach ($items as $keys => $item) <div class="col-lg-4 col-md-4 col-12"> <div class="card"> <div class="card-body"> <div class="compare-product-card"> <div class="compare-p-name">{{$item->name}}</div> <span class="remove-item compare_remove" data-href="{{route('front.compare.remove',$item->id)}}"> <i class="icon-x"></i> </span> <a class="comparison-item-thumb" href="{{route('front.product.solo',$item->slug)}}"> <img src="{{asset('assets/images/'.$item->thumbnail)}}" alt="Image"></a> @if ($item->item_type != 'affiliate') <div class="compare-product-des mt-4"> <p class="mb-0"><b>{{__('Short Details')}}</b> : {{$item->brand->name}} </p> <p class="mb-0"><b>{{__('Brand')}}</b> : {{$item->brand->name}} </p> <p class="mb-0"> <b>{{__('Price')}}</b> : {{PriceHelper::grandCurrencyPrice($item)}} </p> </div> @endif <div class="compare-product-specifications"> @if(isset($item->specification_name) && $item->specification_name && isset($item->specification_description) && $item->specification_description) @php $specifications = array_combine( json_decode($item->specification_name, true), json_decode($item->specification_description, true) ); @endphp @foreach($specifications as $s_name => $s_description) @if(!empty($s_name) && !empty($s_description)) <div class="specifications-details d-flex"> <div class="specification-name-sec"> <p><b>{{ $s_name }}:</b></p> </div> <div class="specification-des-sec mx-1"> {{ $s_description }} </div> </div> @endif @endforeach @endif </div> <div class="attribute-sec-compare-product"> <div class="product-size-n-color-sec"> {{-- Display Size first if it exists --}} @if($item->attributes->where('name', 'Size')->isNotEmpty()) <p class="mb-0"><b>Size:</b> {{ $item->attributes->where('name', 'Size')->first()->options->where('stock', '!=', '0')->pluck('name')->sort()->implode(', ') }} </p> @endif {{-- Display Color next if it exists --}} @if($item->attributes->where('name', 'Color')->isNotEmpty()) <p class="mb-0"><b>Color:</b> {{ $item->attributes->where('name', 'Color')->first()->options->where('stock', '!=', '0')->pluck('name')->sort()->implode(', ') }} </p> @endif </div> </div> <div class="compare-product-add-to-cart"> @if (Auth::user()) <a href="{{ route('front.product.solo', $item->slug) }}" class="btn-for-add-to-cart mr-auto add_to_single_cart" title="{{ __('To Cart') }}">Add To Cart</a> @else <a href="{{ route('user.login') }}" class="btn-for-add-to-cart mr-auto">Add To Cart</a> @endif </div> </div> </div> </div> </div> @endforeach @else <div class="text-center"><strong>{{__('Product not found')}}</strong></div> @endif </div> </div> </div> </div> </div> @endsection
|