@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')
| {{ $keywords['Action'] ?? __('Action') }} | @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{{ $keywords['Remove'] ?? __('Remove') }} | @endforeach
|---|---|
| {{ $keywords['Product Name'] ?? __('Product Name') }} | @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)
{{ truncateString($item->title, 55) }} |
@endif
@endforeach
| {{ $keywords['Product Image'] ?? __('Product Image') }} | @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['Product Price'] ?? __('Product Price') }} | @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))
@if ($flash_status == true)
{{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($product_current_price)) }}
|
@endif
@endforeach
| {{ $keywords['Variations'] ?? __('Variations') }} | @foreach ($compare as $compareItem) @php $product_variations = App\Models\User\ProductVariation::where([ ['item_id', $compareItem['id']], ])->get(); @endphp
@if (count($product_variations) > 0)
|
@endforeach
| {{ $keywords['Ratings'] ?? __('Ratings') }} | @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
| {{ $keywords['Product Description'] ?? __('Product Description') }} | @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)
{!! substr(strip_tags($item->description), 0, 150) !!} |
@endif
@endforeach
| {{ $keywords['Availability'] ?? __('Availability') }} | @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)@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 | @endif @endforeach