@extends('layouts.app') @section('title', 'Checkout') @section('content')

Checkout

@csrf

Shipping Address

Order Summary

@foreach($cartItems as $item)
{{ $item->book->title }}

{{ $item->book->title }}

{{ $item->book->author }}

Qty: {{ $item->quantity }}

₹{{ number_format($item->total_price, 2) }}
@endforeach
Subtotal ₹{{ number_format($subtotal, 2) }}
Shipping @if(auth()->user()->state_id) @if($shipping == 0) FREE @else ₹{{ number_format($shipping, 2) }} @endif @else Calculated based on state selection @endif
@php $totalQuantity = $cartItems->sum('quantity'); $minBulkPurchase = \App\Models\Setting::get('min_bulk_purchase', 10); $isBulkPurchase = $totalQuantity >= $minBulkPurchase; @endphp @if($isBulkPurchase)

Congratulations! You are qualified for special discount on the shipping charges on bulk quantity ({{ $minBulkPurchase }}+ items) purchase!

@endif
Total @if(auth()->user()->state_id) ₹{{ number_format($total, 2) }} @else ₹{{ number_format($subtotal, 2) }} @endif
Your payment information is secure and encrypted
@endsection