@extends('layouts.main') @push('title') Fit Sport Hub - cart @endpush @section('main-section') @if (session()->has('success_message')) @endif @if (count($errors) > 0) @endif

Your Shopping Cart

Continue Shopping
@if ($cart_products->count() > 0)
@foreach ($cart_products as $item)
{{ $item->product_name }}

{{ $item->product_name }}

@if ($item->variant_name)

Variant: {{ $item->variant_name }}

@endif
@csrf @method('DELETE')
Price: @if ($item->variant_price) {{ (int) $item->variant_price }} @else {{ $item->product_price }} @endif
@if ($item->variant_price) {{ $item->variant_price * $item->product_quantity }} @else {{ $item->sale_price * $item->product_quantity }} @endif
@csrf @method('DELETE')
@endforeach
@else @endif

Order Summary

@if (session()->has('coupon'))
Coupon Applied: ({{ session()->get('coupon')['name'] }})
@csrf @method('DELETE')
Discount - {{ $discount }}
@else

Have a Coupon?

@csrf
@endif
Subtotal {{ session()->has('coupon') ? $cart_subtotal : $cart_subtotal }}
@if (!is_null($tax) && $tax > 0)
GST {{ $tax }}
@endif
Total @php // Base total (tax applied if exists, otherwise subtotal) $finaltotal = !is_null($tax) && $tax > 0 ? $newTotal : $cart_subtotal; // Apply coupon if available if(session()->has('coupon')) { $finaltotal = $finaltotal - $discount; } @endphp {{ max($finaltotal, 0) }}
Proceed to Checkout
@endsection @section('extrascripts') @endsection