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

Shopping Cart

@if(count($cartData['items']) > 0)
{{-- Cart Items --}}
@foreach($cartData['items'] as $item) @endforeach
Product Price Quantity Subtotal
@if($item->product->primaryImage) {{ $item->product->name }} @else
{{ substr($item->product->name, 0, 1) }}
@endif
{{ $item->product->name }}

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

@if($item->variant)

{{ $item->variant->name }}: {{ $item->variant->value }}

@endif
{{ price($item->variant?->price ?? $item->product->price) }}
@csrf @method('PATCH') {{ $item->quantity }}
{{ price(($item->variant?->price ?? $item->product->price) * $item->quantity) }}
@csrf @method('DELETE')
← Continue Shopping
@csrf @method('DELETE')
{{-- Cart Summary --}}

Cart Summary

Subtotal ({{ $cartData['item_count'] }} items) {{ price($cartData['subtotal']) }}
Shipping Calculated at checkout
Total {{ price($cartData['subtotal']) }}
Proceed to Checkout
@else

Your cart is empty

Looks like you haven't added anything to your cart yet.

Start Shopping
@endif
@endsection