@extends('layouts.app') @section('content')

🛒 Carrinho

Confere os itens e segue para o pagamento.

← Continuar a comprar
@if(empty($cart))
🛍️

O teu carrinho está vazio

Escolhe um produto e adiciona ao carrinho.

Ver produtos
@else
{{-- TABELA DE ITENS --}}
Itens ({{ count($cart) }})
@php $total = 0; @endphp @foreach($cart as $productId => $item) @php $id = (int)$productId; $subtotal = ($item['price'] ?? 0) * ($item['quantity'] ?? 1); $total += $subtotal; $img = $item['image'] ?? null; $imgUrl = $img ? (str_starts_with($img,'http') ? $img : asset($img)) : asset('images/default.png'); @endphp @endforeach
Produto Qtd Preço Subtotal
{{ $item['name'] ?? 'Produto' }}
{{ $item['name'] ?? 'Produto' }}
SKU #{{ $id }}
@csrf @method('PATCH')
Kz {{ number_format(($item['price'] ?? 0), 2, ',', '.') }} Kz {{ number_format($subtotal, 2, ',', '.') }}
@csrf @method('DELETE')
{{-- RESUMO DE PAGAMENTO --}}
Resumo
Subtotal Kz {{ number_format($total, 2, ',', '.') }}
Entrega Grátis
Total Kz {{ number_format($total, 2, ',', '.') }}
@auth
@csrf
@else 🔐 Entrar para Pagar @endauth
Pagamento 100% seguro
Multicaixa Multicaixa Express
@endif
@endsection