@extends('ecommerce::public.shop-layout') @section('title', 'Checkout - ' . ($settings->site_name ?? 'Store')) @section('content')

Checkout

@if(session('error'))
{{ session('error') }}
@endif
@csrf
{{-- Left: Forms --}}
{{-- Delivery Method Selection --}}

Delivery Method

@if($wsSettings->store_pickup_enabled ?? true) @endif
{{-- Store Pickup Info (hidden by default) --}}
{{-- Contact Information (always shown) --}}

Contact Information

@error('customer_name'){{ $message }}@enderror
@error('customer_phone'){{ $message }}@enderror
{{-- Shipping Address (only for delivery) --}}

Shipping Address

@error('shipping_address'){{ $message }}@enderror
{{-- Location validation error message --}} {{-- Location validation success message --}}
{{-- Payment Method --}}

Payment Method

@php $firstActive = true; $codDisabledByAmount = $wsSettings->cod_max_amount > 0 && $grandTotal > $wsSettings->cod_max_amount; @endphp {{-- Cash on Delivery / Pay at Store --}} @if($wsSettings->cod_enabled ?? true) @if($codDisabledByAmount)
💵
Cash on Delivery Not available for orders above ₹{{ number_format($wsSettings->cod_max_amount, 0) }}
@else @php $firstActive = false; @endphp @endif @endif {{-- Online Payment --}} @if($wsSettings->online_payment_enabled ?? false) @php $firstActive = false; @endphp @endif {{-- No payment methods available --}} @if(!($wsSettings->cod_enabled ?? true) && !($wsSettings->online_payment_enabled ?? false))
⚠️
No Payment Methods Available Please contact store for assistance
@endif
@if($minOrderAmount > 0 && $subtotal < $minOrderAmount)
Minimum order amount is ₹{{ number_format($minOrderAmount, 0) }}. Add ₹{{ number_format($minOrderAmount - $subtotal, 0) }} more.
@endif
{{-- Order Notes --}}

Order Notes (Optional)

{{-- Right: Order Summary --}}

Order Summary

@foreach($cartItems as $item)
@if($item['product']->getPrimaryImageUrl()) @endif
{{ $item['product']->name }} @if($item['variation_name']) {{ $item['variation_name'] }} @endif Qty: {{ (int)$item['qty'] }}
₹{{ number_format($item['total'], 0) }}
@endforeach
Subtotal ₹{{ number_format($subtotal, 0) }}
Shipping @if($shippingFee > 0) ₹{{ number_format($shippingFee, 0) }} @else FREE @endif
@if($codFee > 0 && ($wsSettings->cod_enabled ?? true))
COD Fee ₹{{ number_format($codFee, 0) }}
@endif
Total ₹{{ number_format($grandTotal + (($wsSettings->cod_enabled ?? true) ? $codFee : 0), 0) }}
@if($wsSettings->delivery_days) 🚚 Estimated delivery: {{ $wsSettings->delivery_days }} @endif
← Back to Cart
@endsection