@extends('front.layout.app') @section('content')

MY CART

    @if(session('cart') && count(session('cart')) > 0) @foreach(session('cart') as $cart)
  • img

    {{$cart['name'] ?? ''}}

    ₦{{number_format($cart['old_price'] * $cart['quantity'],2) ?? ''}} ₦{{number_format($cart['price'] * $cart['quantity'],2) ?? ''}}
  • @endforeach @else
  • Your Cart is Empty!

  • @endif
@php $total = 0; // Check if the cart exists and is not empty if (session()->has('cart') && count(session('cart')) > 0) { // Calculate the total price only if the cart is not empty foreach (session('cart') as $item) { $total += $item['price'] * $item['quantity']; } } @endphp
@if(isset(\Illuminate\Support\Facades\Session::all()['cart']) && count(\Illuminate\Support\Facades\Session::all()['cart']) > 0){{ count(session('cart')) }}@else 0 @endif Items ₦{{ number_format($total, 2) }}
Shipping ₦0.0
Subtotal: ₦{{ number_format($total, 2) }}
PROCEED TO CHECKOUT

Express payment options we accept at checkout

@endsection @push('script') @endpush