{{ $errors->first('phone_verify') ?: 'Verify your mobile number once to place '.(settings('fraud.verify_phone', 'cod') === 'all' ? 'orders' : 'cash on delivery orders').'. It takes a minute.' }}Verify now
@endif
{{-- Coupons: type a code or pick one below. Applied in place (no reload); the summary and total refresh. --}}
@php
$cartSubtotal = (float) (app(\App\Modules\Cart\Services\CartService::class)->totals()['subtotal'] ?? 0);
$available = \App\Modules\Orders\Models\Coupon::query()->live()
->where(fn ($q) => $q->whereNull('seller_store_id')->orWhereHas('store', fn ($s) => $s->where('status', 'approved')))
->orderByRaw('seller_store_id is not null')->orderBy('min_order')->limit(8)->get();
@endphp
@php
$usable = $available->filter(fn ($c) => (float) $c->min_order <= $cartSubtotal);
$best = $usable->whereNull('seller_store_id')->map(fn ($c) => $c->discountFor($cartSubtotal))->max();
@endphp
Coupons and offers
@if ($totals['coupon'])
'{{ $totals['coupon']->code }}' appliedYou save {{ inr($totals['discount']) }} on this order
@if ($available->count() > 1)@endif
@else
{{-- One tappable row (like food-delivery apps); the coupons open in a sheet. --}}
@if ($errors->coupon->has('code'))