@php use App\Models\Product; use App\Models\ComboProduct; use App\Services\TranslationService; use App\Services\StoreService; use App\Services\MediaService; use App\Services\CurrencyService; @endphp {{-- @dd($cart_data) --}}
@if (count($cart_data) >= 1 || count($save_for_later) >= 1) @if (count($cart_data) >= 1)
@php $is_save_later_hide = 0; $is_remove_from_cart = 0; $for_checkout = 0; @endphp @foreach ($cart_data['cart_items'] as $cartItem) @endforeach
  {{ labels('front_messages.product', 'Product') }} {{ labels('front_messages.price', 'Price') }} {{ labels('front_messages.quantity', 'Quantity') }} {{ labels('front_messages.total', 'Total') }}
@endif @if (count($save_for_later) >= 1) {{-- @dd($language_code); --}}
@foreach ($save_for_later['cart_items'] as $item) @php // dD($save_for_later['cart_items']); $product_img = app(MediaService::class)->dynamic_image($item->product->image, 400); $product_name = ''; if ($item['cart_product_type'] == 'combo') { $product_name = app(TranslationService::class)->getDynamicTranslation( ComboProduct::class, 'title', $item->product->id, $language_code, ); } else { $product_name = app(TranslationService::class)->getDynamicTranslation( Product::class, 'name', $item->product->id, $language_code, ); } @endphp
@if ($item->productVariant->special_price == 0 || $item->productVariant->special_price == null) {{ app(CurrencyService::class)->currentCurrencyPrice($item->productVariant->price, true) }} @else {{ app(CurrencyService::class)->currentCurrencyPrice($item->productVariant->price, true) }} {{ app(CurrencyService::class)->currentCurrencyPrice($item->productVariant->special_price, true) }} @endif
@endforeach
@endif @php $store_settings = app(StoreService::class)->getStoreSettings(); @endphp {{-- --}} @if (!empty($related_product['product']))
@foreach ($related_product['product'] as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @else @php $title = '' . labels('front_messages.sorry', 'SORRY ') . '' . labels('front_messages.cart_is_currently_empty', 'Cart is currently empty'); @endphp @endif