@extends('frontend.layout') @section('pageHeading') {{ __('Cart') }} @endsection @section('style') @endsection @section('content') @includeIf('frontend.partials.breadcrumb', [ 'breadcrumb' => $bgImg->breadcrumb, 'title' => !empty($pageHeading) ? $pageHeading->cart_page_title : __('Cart'), ])
@if (count($productCart) == 0)

{{ __('Cart is Empty') . '!' }}

@else

@php $totalItems = count($productCart); $position = $currencyInfo->base_currency_symbol_position; $symbol = $currencyInfo->base_currency_symbol; $totalPrice = 0; foreach ($productCart as $key => $product) { $totalPrice += $product['price']; } $totalPrice = number_format($totalPrice, 2, '.', ''); @endphp
@php $cart_total_qty = 0; $cart_total_price = 0; @endphp @foreach ($productCart as $key => $c_product) @php $product = App\Models\Shop\Product::where('id', $key)->first(); @endphp @php $cart_total_qty += $c_product['quantity']; $cart_total_price += $product->current_price * $c_product['quantity']; @endphp @endforeach
{{ __('Product') }} {{ __('Quantity') }} {{ __('Price') }} {{ __('Total') }} {{ __('Remove') }}
{{ strlen(@$c_product['title']) > 50 ? mb_substr(@$c_product['title'], 0, 50, 'UTF-8') . '...' : @$c_product['title'] }}
({{ $product->average_rating }})
{{ $position == 'left' ? $symbol : '' }} {{ $product->current_price }}{{ $position == 'right' ? $symbol : '' }}
{{ $position == 'left' ? $symbol : '' }} {{ $product->current_price * $c_product['quantity'] }} {{ $position == 'right' ? $symbol : '' }}
{{ __('Total Quantity') . ' :' }} {{ $cart_total_qty }}
{{ __('Total Price') . ' :' }} {{ $position == 'left' ? $symbol : '' }}{{ $cart_total_price }}{{ $position == 'right' ? $symbol : '' }}
@endif
@endsection @section('script') @endsection