@extends('layouts.app') @section('title', 'Shopping Cart') @section('content')

Shopping Cart

@if($cartItems->count() > 0)

{{ $cartItems->count() }} Items

@csrf @method('DELETE')
@foreach($cartItems as $item)
@if($item->product->image_url) {{ $item->product->name }} @else
📦
@endif

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

{{ $item->product->supplier?->company_name }}

SKU: {{ $item->product->sku }}

@csrf @method('DELETE')
@csrf @method('PATCH')
{{ $item->quantity }}
@csrf @method('PATCH')

R {{ number_format($item->product->price, 2) }} each

R {{ number_format($item->quantity * $item->product->price, 2) }}

@endforeach

Order Summary

Subtotal R {{ number_format($subtotal, 2) }}
VAT (15%) R {{ number_format($tax, 2) }}
Delivery Calculated at checkout
Total R {{ number_format($total, 2) }}
Proceed to Checkout Continue Shopping
@else
🛒

Your cart is empty

Looks like you haven't added any products yet.

Start Shopping
@endif
@endsection