@extends('layouts.app') @section('title', 'Keranjang Belanja') @section('content')

Keranjang Belanja

← Lanjut Belanja
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if (empty($cartItems))

Keranjang Kosong

Belum ada produk di keranjang Anda

Mulai Belanja
@else

{{ count($cartItems) }} Item dalam Keranjang

@csrf @method('DELETE')
@foreach ($cartItems as $item)
@if ($item['product']->image_path) {{ $item['product']->name }} @else
@endif

{{ $item['product']->name }}

{{ $item['product']->description }}

{{ $item['product']->weight }} kg @if ($item['product']->is_halal) Halal @endif
@csrf @method('PATCH')
Rp {{ number_format($item['subtotal'], 0, ',', '.') }}
Rp {{ number_format($item['product']->total_price, 0, ',', '.') }} / item
@csrf @method('DELETE')
@endforeach
Total Berat: {{ number_format($totalWeight, 2) }} kg
Rp {{ number_format($total, 0, ',', '.') }}
@endif
@endsection