Checkout

  1. 1 Cart
  2. 2 Address & payment
  3. 3 Order placed
@error('cart')@enderror @error('coupon')@enderror @php $phoneCheck = app(\App\Modules\Auth\Support\PhoneVerification::class); $needsPhone = auth()->check() && ($phoneCheck->requiredFor(auth()->user(), 'cod') || $phoneCheck->requiredFor(auth()->user(), 'online')); @endphp @if ($needsPhone || $errors->has('phone_verify')) @endif
@csrf

1 Delivery address

@if ($address)

Filled in from your default address. Manage addresses

@endif
@if ($whatsappOptIn)
@endif @unless ($address)
@endunless

2 Delivery · {{ $totals['shipments'] }} {{ Str::plural('shipment', $totals['shipments']) }}

@foreach ($groups as $seller => $lines)
Delivery {{ $loop->iteration }} Ships in {{ $lines->first()['product']['ships_in'] }} @php $pc = ($totals['freight'] ?? null) ? null : ($totals['parcels'][$seller] ?? null); @endphp {{-- one EBC fare covers all deliveries --}} @if ($pc) @if ($pc['shipping'] > 0) {{ inr($pc['shipping']) }} delivery @else Free delivery @endif @if ($pc['packing'] > 0) + {{ inr($pc['packing']) }} packing @endif @if ($pc['gap'] > 0) Add {{ inr($pc['gap']) }} more to this delivery for free delivery @endif @endif
@foreach ($lines as $line) {{ Str::limit($line['product']['name'], 28) }} × {{ $line['qty'] }} @endforeach
@endforeach @if ($dateMode !== 'off' && $deliveryDates->isNotEmpty()) @php $pickedDate = old('delivery_date', $dateMode === 'required' ? null : ''); @endphp
Preferred delivery date @if ($dateMode === 'optional')(optional)@endif @error('delivery_date')@enderror
@if ($dateMode === 'optional') @endif @foreach ($deliveryDates as $d) @endforeach
@if ($slotMode !== 'off') @endif @if ($note = settings('delivery.note'))

{{ $note }}

@endif
@endif
hasAny(['buyer_gstin', 'buyer_legal_name'])) open @endif> Buying for a business? Add your GSTIN

Your GSTIN and business name will appear on your bill.

3 Payment method

@error('payment')@enderror @php $methods = [ 'cod' => ['bi-cash-coin', 'Cash on delivery', $totals['cod'] ? 'Pay in cash when each parcel arrives' : ($totals['cod_note'] ?? ($totals['cod_enabled'] ? 'Not available for orders of this value' : 'Not available right now')), $totals['cod']], 'online' => ['bi-shield-lock', 'Pay online', $onlineEnabled ? 'UPI, cards, netbanking and wallets, secured by Razorpay' : 'Coming soon', $onlineEnabled], ]; $methods = $onlineEnabled ? ['online' => $methods['online'], 'cod' => $methods['cod']] : $methods; $default = old('payment', collect($methods)->filter(fn ($m) => $m[3])->keys()->first()); @endphp
@foreach ($methods as $key => [$icon, $label, $note, $enabled]) @endforeach
@if ($default)

By placing your order you agree to our terms and return policy.

@else

No payment method is available for this order right now. Please contact support.

@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
@csrf @method('DELETE')
@if ($available->count() > 1)@endif @else {{-- One tappable row (like food-delivery apps); the coupons open in a sheet. --}} @if ($errors->coupon->has('code'))

{{ $errors->coupon->first('code') }}

@endif @endif

Apply coupon

@csrf
@if ($available->isNotEmpty())

Available coupons

    @foreach ($available as $c) @php $applied = $totals['coupon']?->is($c); $short = (float) $c->min_order > $cartSubtotal ? (float) $c->min_order - $cartSubtotal : 0; @endphp
  • $applied, 'is-locked' => $short > 0])>
    {{ $c->headline() }}
    {{ $c->code }}

    {{ $c->description }}

    @if ($short > 0) Add {{ inr($short) }} more to use this @elseif (! $c->seller_store_id) You save {{ inr($c->discountFor($cartSubtotal)) }} @else On selected products @endif @if ((float) $c->min_order > 0) · Min. order {{ inr($c->min_order) }}@endif @if ($c->ends_at) · Till {{ $c->ends_at->format('d M') }}@endif
    @if ($applied) Applied @elseif ($short <= 0)
    @csrf
    @endif
  • @endforeach
@else

No offers right now. Have a code? Enter it above.

@endif
@include('storefront.partials.order-summary', ['checkout' => true])