@foreach($order->items as $item)
@if($item->product->image)

@else
@endif
{{ $item->product->name }}
Quantidade: {{ $item->quantity }}
{{ number_format($item->price * $item->quantity, 2) }}€
@if($item->product->is_digital && $item->product->hasDownload())
@if($order->downloads_released)
@if($item->product->file_url)
Aceder
@endif
@if($item->product->file_path)
Download
@endif
@else
Aguarda confirmação de pagamento
@endif
@endif
@endforeach
@php $pendingDigitalItems = $order->items->filter(fn($item) => $item->product->is_digital && $item->product->hasDownload() && !$order->downloads_released); @endphp
@if($pendingDigitalItems->count() > 0)
Produtos Digitais
Os produtos digitais estarão disponíveis para download após a confirmação do pagamento. Receberá um email com os links.
@endif
Subtotal
{{ number_format($order->subtotal, 2) }}€
@if($order->discount_amount > 0)
Desconto
-{{ number_format($order->discount_amount, 2) }}€
@endif
@if($order->coupon_discount > 0)
Cupão ({{ $order->coupon_code }})
-{{ number_format($order->coupon_discount, 2) }}€
@endif
@if($order->iva_amount > 0)
IVA
{{ number_format($order->iva_amount, 2) }}€
@endif
Total
{{ number_format($order->total, 2) }}€