Shopping Cart

@if(session('success'))
{{ session('success') }}
@endif @if($cartItems->count() > 0)
@php $total = 0; @endphp @foreach($cartItems as $item) @php $price = $item->product->discount_price ?? $item->product->price; $subtotal = $price * $item->quantity; $total += $subtotal; @endphp @endforeach
Product Price Quantity Action Subtotal

{{ $item->product->name }}

{{ $item->product->category->name }}

৳{{ number_format($price, 2) }} {{ $item->quantity }}
@csrf
@csrf @method('DELETE')
৳{{ number_format($subtotal, 2) }}

Total: ৳{{ number_format($total, 2) }}

Continue Shopping
@else

Your cart is empty

Start Shopping
@endif