@extends('frontend.layouts.main') @section('title', 'Đặt hàng') @section('idMain', 'page-cart') @section('css') @endsection @section('content')
@if (!empty($carts) && count($carts) > 0)
Sản Phẩm
Đơn Giá
Số Lượng
Số Tiền
Thao Tác
@foreach($carts as $key => $cart)
{{-- Product Info --}}
{{ $cart['name'] }}
{{ $cart['name'] }}
@if(!empty($cart['option_name']))
{{ $cart['option_name'] }}
@endif
{{-- Price --}}
Giá: @if(!empty($cart['price_sale']) && $cart['price_sale'] > 0) {{ number_format($cart['price_sale'], 0, ',', '.') }}đ @else {{ number_format($cart['price'], 0, ',', '.') }}đ @endif
{{-- Quantity --}}
Số lượng:
{{-- Total Price --}}
Tổng giá: {{ number_format(($cart['price_sale'] ?? $cart['price']) * $cart['quantity'], 0, ',', '.') }}đ
{{-- Actions --}}
@endforeach
Tổng cộng ({{ $totalQuantity }} sản phẩm) :
{{ number_format($totalPrice, 0, ',', '.') }}đ

Thông tin người mua

@if (isset($paymentMethod) && $paymentMethod->childs->isNotEmpty())

{{ $paymentMethod->name }}

@foreach ($paymentMethod->childs as $method) @endforeach
@endif
@else

Giỏ hàng không có sản phẩm nào!

Tiếp tục mua sắm
@endif
@endsection @section('js') @endsection