@extends('layouts.main') @push('title') Fit Sport Hub - Checkout @endpush @section('main-section')

Billing Details

{{ csrf_field() }}
@if (auth()->user()->email) @else @endif

Your Order

@if ($cart_products->count() > 0) @foreach ($cart_products as $item)
{{ $item->product_title }}

{{ $item->product_title }}

Qty: {{ $item->product_quantity }}

₹{{ $item->variant_price && $item->variant_price > 0 ? $item->variant_price : $item->product_price }}

@endforeach @endif
Subtotal {{ $cart_total - $tax }}
@if (session()->has('coupon'))
Discount ({{ session()->get('coupon')['name'] }}) -{{ $discount }}
@endif @if (!is_null($tax) && $tax > 0)
GST {{ $tax }}
@endif
Total (Inclusive of All Taxes) @php // Base total: include tax if available, else use subtotal $finaltotal = !is_null($tax) && $tax > 0 ? $newTotal : $cart_subtotal; // Deduct coupon discount if applied if(session()->has('coupon')) { $finaltotal -= $discount; } // Prevent negative totals $finaltotal = max($finaltotal, 0); @endphp {{ $finaltotal }}
@endsection @section('extrascripts') @endsection