@extends('user-front.layout') @section('meta-description', !empty($seo) ? $seo->cart_meta_description : '') @section('meta-keywords', !empty($seo) ? $seo->cart_meta_keywords : '') @section('breadcrumb_title', $pageHeading->cart_page ?? __('Cart')) @section('page-title', $pageHeading->cart_page ?? __('Cart')) @section('content') @php $cartTotal = 0; $countitem = 0; if ($cart) { foreach ($cart as $p) { $cartTotal += $p['total']; $countitem += $p['qty']; } } if (is_null($cart)) { $cart = []; } @endphp
@if (count(@$cart) > 0)

{{ $keywords['Total Items'] ?? __('Total Items') }}: {{ $totalQty }}

{{ $keywords['Total Price'] ?? __('Total Price') }}: {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, $totalCart) }}

@foreach ($cart as $key => $item) @php $id = $item['id']; $product = App\Models\User\UserItem::where('id', $item['id'])->with('currency')->first(); if ($product) { $content = $product ->itemContents() ->where('language_id', $userCurrentLang->id) ->select('title', 'slug') ->first(); $flash_info = flashAmountStatus($product->id, $product->current_price); $product_current_price = $flash_info['amount']; $flash_status = $flash_info['status']; } else { $content = null; } @endphp @endforeach
{{ $keywords['Products'] ?? __('Products') }} {{ $keywords['Quantity'] ?? __('Quantity') }} {{ $keywords['Total'] ?? __('Total') }} {{ $keywords['Remove'] ?? __('Remove') }}
@if (!is_null($content)) @else @endif @if (!is_null($content))
{{ convertUtf8($content->title) }}

{{ $keywords['Item Price'] ?? __('Item Price') }}: {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, $item['product_price']) }}

@php $variation_total = 0; @endphp @if (!empty($item['variations']))

{{ $keywords['Variations'] ?? __('Variations') }}:

@foreach ($item['variations'] as $k => $itm) @php $variation_total = $variation_total + $itm['price']; //show variations name $vNameId = App\Models\User\ProductVariationContent::where( 'product_variation_id', $itm['variation_id'], ) ->pluck('variation_name') ->first(); $variant_id = App\Models\VariantContent::where('id', $vNameId) ->pluck('variant_id') ->first(); $variation_name = App\Models\VariantContent::where([ ['variant_id', $variant_id], ['language_id', $userCurrentLang->id], ]) ->pluck('name') ->first(); //show variation options name $vOptionId = App\Models\User\ProductVariantOptionContent::where([ ['language_id', $userCurrentLang->id], ['product_variant_option_id', $itm['option_id']], ]) ->pluck('option_name') ->first(); $vOptionName = App\Models\VariantOptionContent::where([ ['language_id', $userCurrentLang->id], ['id', $vOptionId], ]) ->pluck('option_name') ->first(); @endphp
{{ $variation_name }}: {{ $vOptionName }} - ({{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, $itm['price']) }})
@endforeach @endif @if ($shop_settings->item_rating_system == 1)
({{ reviewCount($item['id']) }})
@endif
@endif
{{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, $item['total']) }}
@else

{{ $keywords['Your Cart is Empty'] ?? __('Your Cart is Empty') }}

{{ $keywords['Add something to make me happy'] ?? __('Add something to make me happy') . ' :)' }}

{{ $keywords['Back to Shop'] ?? __('Back to Shop') }}
@endif
@if (count($cart) > 0)
{{ $keywords['Checkout'] ?? __('Checkout') }}
@endif
@endsection