@extends('frontend.layout') @section('pageHeading') @if (!empty($pageHeading)) {{ $pageHeading->cart_page_title }} @endif @endsection @section('metaKeywords') @if (!empty($seoInfo)) {{ $seoInfo->meta_keyword_cart }} @endif @endsection @section('metaDescription') @if (!empty($seoInfo)) {{ $seoInfo->meta_description_cart }} @endif @endsection @section('content') @includeIf('frontend.partials.breadcrumb', [ 'breadcrumb' => $bgImg->breadcrumb, 'title' => $pageHeading ? $pageHeading->cart_page_title : '', ])
@if (count($productCart) == 0)

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

@else
{{-- this below div will use to show message when cart is empty --}}
@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
  • {{ __('Total Items') . ':' }} {{ $totalItems }}
  • {{ __('Cart Total') . ':' }} {{ $position == 'left' ? $symbol : '' }}{{ $totalPrice }}{{ $position == 'right' ? $symbol : '' }}
@foreach ($productCart as $key => $product) @php $price = floatval($product['price']); $quantity = floatval($product['quantity']); $unitPrice = number_format($price / $quantity, 2, '.', ''); $perItemTotal = number_format($product['price'], 2, '.', ''); @endphp @endforeach
{{ __('Product') }} {{ __('Quantity') }} {{ __('Unit Price') }} {{ __('Total') }} {{ __('Action') }}
@php $slug = $product['slug']; @endphp

{{ $product['title'] }}

{{ $position == 'left' ? $symbol : '' }}{{ $unitPrice }}{{ $position == 'right' ? $symbol : '' }} {{ $position == 'left' ? $symbol : '' }}{{ $perItemTotal }}{{ $position == 'right' ? $symbol : '' }}
@endif
@endsection @section('script') @endsection