@php $currency = currency_code( $cart->currency_code ?? null ); /* * Keep these as raw numeric values. * The money() helper performs the final formatting. */ $summarySubtotal = (float) ($subtotal ?? 0); $summaryShipping = (float) ($shippingCost ?? 0); $summaryTotal = (float) ($estimatedTotal ?? 0); $physicalProducts = (bool) ( $hasPhysicalProducts ?? false ); $cartItems = $cart->items ?? collect(); $itemsCount = $cartItems->count(); $quantityTotal = $cartItems->sum( static function ($item): int { return max( 0, (int) ($item->quantity ?? 1) ); } ); $shippingQuotesAvailable = ! empty($quotes); @endphp
{{ __('Order Summary') }}
@if($itemsCount > 0) {{ number_format($itemsCount) }} {{ \Illuminate\Support\Str::plural( __('item'), $itemsCount ) }} @endif
{{-- Cart information --}} @if($quantityTotal > 0)
{{ __('Total quantity') }} {{ number_format($quantityTotal) }}
@endif {{-- Price breakdown --}}
{{-- Subtotal --}}
{{ __('Subtotal') }}
{{ money($summarySubtotal, $currency) }}
{{-- Shipping --}} @if($physicalProducts)
{{ __('Shipping') }}
@if($summaryShipping > 0) {{ money($summaryShipping, $currency) }} @elseif($shippingQuotesAvailable) {{ __('Select method') }} @else {{ __('Not calculated') }} @endif
@endif {{-- Tax notice --}}
{{ __('Tax / VAT') }}
{{ __('Calculated next') }}
{{-- Estimated total --}}
{{ __('Estimated Total') }}
{{ money($summaryTotal, $currency) }}
{{ __( 'The final tax breakdown is calculated from your delivery location and will appear on the payment page.' ) }}
{{-- Continue button --}}
{{ __('Back to Cart') }}
{{-- Security notice --}}
{{ __('Your data is secure.') }} {{ __( 'SSL encryption protects your checkout information.' ) }}
@push('styles') @endpush