@extends('layouts.app') @section('title', __('cart.title')) @section('content')

{{ __('cart.title') }}

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if($cart->items->count() > 0)

{{ __('cart.cart_items') }} ({{ $cart->total_items }})

@foreach($cart->items as $item)
@if($item->product->image_url) {{ $item->product->name }} @else
@endif

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

{{ $item->product->category ?? __('cart.uncategorized') }}

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

@csrf
@csrf
@endforeach

{{ __('cart.order_summary') }}

{{ __('cart.subtotal') }} ({{ $cart->total_items }} {{ __('cart.items') }}) ${{ number_format($cart->total_amount, 2) }}
{{ __('cart.shipping') }} {{ __('cart.calculated_checkout') }}
{{ __('cart.total') }} ${{ number_format($cart->total_amount, 2) }}
@csrf
@csrf
{{ __('cart.continue_shopping') }}
@else

{{ __('cart.empty_cart') }}

{{ __('cart.empty_msg') }}

{{ __('cart.start_shopping') }}
@endif
@endsection