@extends('layouts.app') @section('title', 'Giỏ hàng - XING NEW') @section('content')

Giỏ hàng của bạn

@if(session('cart') && count(session('cart')) > 0)
@foreach(session('cart') as $id => $details)
@if($details['image']) {{ $details['name'] }} @else
@endif

{{ $details['name'] }}

@if(isset($details['attributes']) && !empty($details['attributes']))
@foreach($details['attributes'] as $attr => $val) {{ $attr }}: {{ $val }} @endforeach
@endif

{{ number_format($details['price'], 0, ',', '.') }}đ

{{ number_format($details['price'] * $details['quantity'], 0, ',', '.') }}đ

@endforeach

Tổng cộng

Tạm tính {{ number_format($total, 0, ',', '.') }}đ
(Giá chưa bao gồm phí vận chuyển)
Thành tiền {{ number_format($total, 0, ',', '.') }}đ
Tiến hành đặt hàng Tiếp tục mua sắm
@else

Giỏ hàng đang trống

Bạn chưa thêm sản phẩm nào vào giỏ hàng.

Khám phá sản phẩm
@endif
@push('scripts') @endpush @endsection