@extends('frontend.layout.applayout') @section('title', 'cart') @section('main-content')

View Products Added To Your Cart

list view
Grid view
@if (request()->mode == 'list')
@if (is_null($cart) || count($cart?->items) == 0)

Your cart is empty

@else @foreach ($cart?->items as $item) @php $price = $item?->product->price; $today = date('Y-m-d'); if ($item->product?->special_price_from) { if ( $item->product?->special_price_from <= $today && $item->product?->special_price_to >= $today ) { $price = $item?->product->special_price; } } @endphp @endforeach @endif
@else @if (Auth::guard('customer')->check()) @endif @if (is_null($cart) || count($cart?->items) == 0) @else @foreach ($cart?->items as $item) @php $price = $item?->product->price; $today = date('Y-m-d'); if ($item->product?->special_price_from) { if ( $item->product?->special_price_from <= $today && $item->product?->special_price_to >= $today ) { $price = $item?->product->special_price; } } if ($item->variant_id) { $price = $item->variant?->price; } @endphp @if (Auth::guard('customer')->check()) @else @endif @if (Auth::guard('customer')->check()) @endif @endforeach @endif
Product Price QuantitySubtotal

Your cart is empty

${{ $price }}N/A
${{ number_format($price * $item->quantity ?? 0, 2) }}
@endif
{{-- @if (!is_null($cart) && count($cart?->items) != 0)

@if ($cart?->coupon_code)

Applied Coupon:- {{ $cart->coupon_code }}

@endif
@endif --}}
@if (!is_null($cart) && count($cart?->items) != 0) @if (Auth::guard('customer')->check())

Cart Summary

@if (!is_null($cart)) @endif
Sub Total ${{ number_format($cart->total_amount ?? 0, 2) }}
Taxable Product SubTotal ${{ number_format($cart->tax_total ?? 0, 2) }}
Tax 13 % ${{ number_format($cart->tax ?? 0, 2) }}
{{--
Coupon Discount ${{ number_format($cart->discount_amount ?? 0, 2) }}
--}} {{--
Tax 0 % ${{ $cart?->tax_total??0 }}
--}}
Grand Total ${{ number_format($cart?->grand_total ?? 0, 2) }}
@endif @endif
@push('scripts') @endpush @endsection