@extends('client.layouts.main') @section('title', 'Shopping Cart') @section('content')
Cart Items
@forelse($cart->items as $item) @empty @endforelse
Description Type Billing Cycle Qty Price Setup Fee
@if($item->product) {{ $item->product->name }} @if($item->domain)
{{ $item->domain }} @endif @elseif($item->domain) {{ $item->domain }} @else {{ ucfirst(str_replace('_', ' ', $item->item_type)) }} @endif
{{ ucfirst(str_replace('_', ' ', $item->item_type)) }} {{ $item->billingCycle->name ?? ($item->quantity > 1 ? $item->quantity . ' Years' : '1 Year') }} @if(in_array($item->item_type, ['domain_register', 'domain_renewal']))
@csrf @method('PUT')
@elseif($item->item_type === 'domain_transfer') 1 (fixed) @else {{ $item->quantity }} @endif
{{ number_format($item->unit_price, 2) }} {{ number_format($item->setup_fee, 2) }}
@csrf @method('DELETE')
Your cart is empty.
@if($cart->items->isNotEmpty())
Coupon Code
@if($cart->coupon) Coupon {{ $cart->coupon->code }} applied ({{ $cart->coupon->type === 'percentage' ? $cart->coupon->value . '%' : number_format($cart->coupon->value, 2) }} off).
@csrf @method('DELETE')
@else
@csrf
@endif
@endif
Order Summary
@if($totals['setup_fees'] > 0) @endif @if($totals['discount'] > 0) @endif @if(($totals['tax'] ?? 0) > 0) @endif
Subtotal {{ number_format($totals['subtotal'], 2) }}
Setup Fees {{ number_format($totals['setup_fees'], 2) }}
Discount -{{ number_format($totals['discount'], 2) }}
Tax {{ number_format($totals['tax'], 2) }}
Total {{ number_format($totals['total'], 2) }}
@if($cart->items->isNotEmpty()) @endif
@endsection