@extends('layouts.storefront') @section('content')

سلة المشتريات

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if($cart && count($cart))
@php $total = 0; @endphp @foreach($products as $product) @php $qty = $cart[$product->id]; $subtotal = $product->price * $qty; $total += $subtotal; @endphp @endforeach
المنتج السعر الكمية المجموع
{{ $product->name }} {{ $product->name }}
{{ $product->price }} ﷼ @csrf {{ $subtotal }} ﷼
@csrf
الإجمالي: {{ $total }} ﷼
الانتقال إلى الدفع @else
سلة المشتريات فارغة.
@endif
@endsection