@extends('layouts.guest-landing') {{-- Use public layout --}} @section('title', 'Your Shopping Cart') @section('content') {{-- Alpine component for status check --}}

Your Cart

{{-- Display flash messages (Success/Error from redirect) --}}

{{-- Use whitespace-pre-line for multi-line errors --}}
{{-- Amazon Status Check Area --}}
{{-- Status Message Display Area --}}
{{-- End Status Check Area --}} {{-- Check if cart has items OR the special donation item --}} @if ($cartCount > 0 || Cart::has('EXTRA_DONATION')) {{-- Loop through each Address Group passed from CartController@show --}} @foreach ($cartData as $addressId => $group)
{{-- Address Header --}}

Shipping To: {{ $group['address_display'] ?? 'Unknown Address' }} @if ($group['address'] && $group['address']->is_default) (Default Address) @endif

For Campaign: {{ $group['campaign_title'] ?? 'Unknown Campaign' }}

{{-- Items Table for this Address --}}
@foreach ($group['items'] as $item) {{-- Product Cell --}} {{-- Price Cell --}} {{-- Quantity Cell --}} {{-- Subtotal Cell --}} {{-- Remove Action Cell --}} @endforeach
Product Price Quantity Subtotal Remove
@if ($item->attributes->image_url) {{ $item->name }} @else @endif
{{ $item->name }}
${{ number_format($item->price, 2) }} {{ $item->quantity }} ${{ number_format($item->getPriceSum(), 2) }}
@csrf @method('DELETE')
{{-- End Address Group Block --}} @endforeach {{-- Display Donation Row Separately if it exists --}} @if (Cart::has('EXTRA_DONATION')) @php $donationItem = Cart::get('EXTRA_DONATION'); @endphp

Cash Donation

{{-- Donation Item Cell --}}
{{ $donationItem->name }}
${{ number_format($donationItem->price, 2) }} {{ $donationItem->quantity }} ${{ number_format($donationItem->getPriceSum(), 2) }}
@csrf @method('DELETE')
@endif {{-- Donation Form & Cart Summary --}}
{{-- Donation Form --}}
@csrf
$
@error('donation_amount')

{{ $message }}

@enderror
{{-- Spacer --}} {{-- Cart Summary & Actions --}}
@csrf @method('DELETE')

Grand Total: ${{ number_format($cartTotal, 2) }}

{{-- Updated Note Text --}}

Note:

  1. Orders for the Amazon Products selected would be placed to Amazon via our Amazon Business partner account.
  2. The products will be shipped by Amazon to our campaign addresses based on availability.
  3. You shall receive a receipt for the entire amount of donation regardless of product availability.
  4. Kindly consider making an additional donation with each order you place for us, that would go a long way in supporting us!
{{-- Link to Payment Page --}} Proceed to Payment
@else {{-- Empty Cart Message --}}

Your cart is empty

Browse campaigns to find products.

@endif
@endsection