@extends('user-front.layout') @section('meta-description', !empty($seo) ? $seo->compare_meta_description : '') @section('meta-keywords', !empty($seo) ? $seo->compare_meta_keywords : '') @section('breadcrumb_title', $pageHeading->compare_page ?? __('Compare')) @section('page-title', $pageHeading->compare_page ?? __('Compare')) @section('content')
@if (!empty($compare))
@foreach ($compare as $key => $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); @endphp @endforeach @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); @endphp @if ($item) @endif @endforeach @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); @endphp @if ($item) @endif @endforeach @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); if (!is_null($item)) { $flash_info = flashAmountStatus($item->item->id, $item->item->current_price); $product_current_price = $flash_info['amount']; $flash_status = $flash_info['status']; } @endphp @if (!is_null($item)) @endif @endforeach @foreach ($compare as $compareItem) @php $product_variations = App\Models\User\ProductVariation::where([ ['item_id', $compareItem['id']], ])->get(); @endphp @endforeach @if ($shop_settings->item_rating_system == 1) @endif @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with([ 'variations' => function ($q) use ($userCurrentLang) { $q->where('language_id', '=', $userCurrentLang->id); }, 'item', ]) ->first(); @endphp @if ($item && $shop_settings->item_rating_system == 1) @endif @endforeach @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); @endphp @if ($item) @endif @endforeach @foreach ($compare as $compareItem) @php $item = \App\Models\User\UserItemContent::where('item_id', $compareItem['id']) ->where('language_id', '=', $userCurrentLang->id) ->with(['item']) ->first(); @endphp @if ($item) @endif @endforeach
{{ $keywords['Action'] ?? __('Action') }} {{ $keywords['Remove'] ?? __('Remove') }}
{{ $keywords['Product Name'] ?? __('Product Name') }}
{{ truncateString($item->title, 55) }}
{{ $keywords['Product Image'] ?? __('Product Image') }}
{{ $keywords['Product Price'] ?? __('Product Price') }}
@if ($flash_status == true) {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($product_current_price)) }} {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->item->current_price)) }}   {{ $item->item->flash_amount }}% {{ $keywords['OFF'] ?? __('OFF') }} @else {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->item->current_price)) }} {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->item->previous_price)) }} @endif
@php $customer_id = Auth::guard('customer')->check() ? Auth::guard('customer')->user()->id : null; $checkWishList = $customer_id ? checkWishList($item->item_id, $customer_id) : false; @endphp @if ($shop_settings->catalog_mode != 1) @endif
{{ $keywords['Variations'] ?? __('Variations') }} @if (count($product_variations) > 0)
@else {{ $keywords['Not available'] ?? __('Not available') }} @endif
{{ $keywords['Ratings'] ?? __('Ratings') }}
({{ reviewCount($compareItem['id']) }})
{{ $keywords['Product Description'] ?? __('Product Description') }}

{!! substr(strip_tags($item->description), 0, 150) !!}

{{ $keywords['Availability'] ?? __('Availability') }} @if ($item->item->type == 'physical') @php $varitaion_stock = VariationStock($compareItem['id']); @endphp @if ($varitaion_stock['has_variation'] == 'yes') @if ($varitaion_stock['stock'] == 'yes') {{ $keywords['In Stock'] ?? __('In Stock') }} @else {{ $keywords['Out of Stock'] ?? __('Out of Stock') }} @endif @else @if ($item->item->stock > 0) {{ $keywords['In Stock'] ?? __('In Stock') }} @else {{ $keywords['Out of Stock'] ?? __('Out of Stock') }} @endif @endif @else {{ $keywords['In Stock'] ?? __('In Stock') }} @endif
@else

{{ $keywords['No product found to compare'] ?? __('No product found to compare') }}

{{ $keywords['Back to Shop'] ?? __('Back to Shop') }}
@endif
{{-- Variation Modal Starts --}} {{-- Variation Modal Ends --}} @endsection