@extends('layouts.app') @section('title', 'Mon Panier') @section('content') {{-- ═══ CART BANNER ═══ --}}
Mon panier

Mon Panier

@php $cartCount = collect($cart)->sum('quantity'); @endphp @if($cartCount > 0)

{{ $cartCount }} article(s) dans votre panier

@endif
@if(empty($cart)) {{-- ─── Panier vide ─── --}}

Votre panier est vide

Ajoutez des produits à votre panier pour commencer.

Parcourir les produits
@else
{{-- ─── Liste des articles ─── --}}
@foreach($cart as $id => $item)
{{-- Ligne principale : image + infos + actions --}}
{{-- Image produit --}}
@if($item['image']) {{ $item['name'] }} @else
@endif
{{-- Infos + contrôles --}}
{{-- Nom + prix unitaire + bouton supprimer --}}

{{ $item['name'] }}

{{ number_format($item['price'], 0, ',', ' ') }} FCFA / unité

{{-- Supprimer --}}
@csrf @method('DELETE')
{{-- Quantité + sous-total --}}
{{-- Contrôle quantité --}}
@csrf @method('PATCH')
{{-- Sous-total --}}

Sous-total

{{ number_format($item['price'] * $item['quantity'], 0, ',', ' ') }} FCFA

@endforeach {{-- Actions bas de liste --}}
Continuer les achats
@csrf @method('DELETE')
{{-- ─── Récapitulatif ─── --}}

Récapitulatif

{{-- Détail lignes --}}
@foreach($cart as $item)
{{ $item['name'] }} ×{{ $item['quantity'] }} {{ number_format($item['price'] * $item['quantity'], 0, ',', ' ') }} FCFA
@endforeach
{{-- Total --}}
Total {{ number_format($total, 0, ',', ' ') }} FCFA

Frais de livraison confirmés à la commande

{{-- CTA Commander --}} Passer la commande {{-- Garanties --}}
@foreach([ ['icon' => 'lock', 'color' => 'text-green-500', 'label' => 'Sécurisé'], ['icon' => 'truck', 'color' => 'text-blue-500', 'label' => 'Livraison'], ['icon' => 'money-bill','color' => 'text-amber-500', 'label' => 'Paiement livraison'], ] as $g)

{{ $g['label'] }}

@endforeach
@endif
@endsection