Xác nhận đơn hàng

@if($cartItems->isEmpty())

Không có sản phẩm nào trong giỏ hàng.

@else {{-- Card bao ngoài --}}
{{-- Danh sách sản phẩm --}}
@foreach($cartItems as $item)
{{ $item->product->product_name }}
@php $unitPrice = $item->product->is_sale ? $item->product->sale_price : $item->product->price; @endphp
{{ $item->product->product_name }}

Số lượng: {{ $item->quantity }}

Đơn giá: {{ number_format($unitPrice * $item->quantity) }}₫

Thành tiền: {{ number_format($unitPrice * $item->quantity) }}₫

@endforeach
{{-- Phần chọn thanh toán --}}

Tạm tính: {{ number_format($total, 0, ',', '.') }}₫

Khuyến mãi: 0₫

Tổng cộng: {{ number_format($total, 0, ',', '.') }}₫

@csrf {{-- Form áp dụng voucher --}}
@endif