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

Checkout

@if (session('error'))

Error

{{ session('error') }}

@endif @if (session('success'))

Success

{{ session('success') }}

@endif @if ($errors->any())

There were errors with your submission

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf

Contact Information

We'll use this to communicate about your order.

@error('name')

{{ $message }}

@enderror
@error('phone')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror

Shipping Address

Where should we deliver your order?

@if($addresses->count() > 0)
@foreach($addresses as $address)
@endforeach
@else @endif

New Address Details

@error('address_line1')

{{ $message }}

@enderror
@error('city')

{{ $message }}

@enderror
@error('state')

{{ $message }}

@enderror
@error('postal_code')

{{ $message }}

@enderror

Order Summary

@if(isset($coupons) && $coupons->isNotEmpty())

Available Coupons

@foreach($coupons as $coupon)

{{ $coupon->code }}

@if($coupon->type === 'percentage') {{ $coupon->value }}% Off @else ₹{{ number_format($coupon->value, 0) }} Off @endif @if($coupon->min_spend > 0) (Min. Order: ₹{{ number_format($coupon->min_spend, 0) }}) @endif

@if($coupon->valid_until)

Expires: {{ $coupon->valid_until->format('d M Y') }}

@endif
@endforeach
@endif @if($settings->gift_card_enabled)

Gift Card

@php // Fetch Gift Cards where user is recipient $myGiftCards = \App\Models\GiftCard::active() ->where('recipient_email', $user->email) ->get(); @endphp @if($myGiftCards->count() > 0)

Your Available Cards:

@foreach($myGiftCards as $card)
{{ $card->code }} Value: ₹{{ $card->amount }}
Use
@endforeach
@endif
@endif @if($settings->wallet_enabled && isset($walletBalance))

Wallet Balance

{{ $walletBalance }} Points (Value: ₹{{ number_format($walletBalance / ($settings->wallet_exchange_rate > 0 ? $settings->wallet_exchange_rate : 100), 2) }})

@if($walletBalance >= $settings->wallet_min_points_redeem)
@else

Minimum {{ $settings->wallet_min_points_redeem }} points required to redeem.

@endif
@endif
    @foreach($cart->items as $item)
  • @php $img = null; if ($item->variation && $item->variation->image_path) { $img = $item->variation->image_path; } else { $mainImage = $item->product->images->sortBy('sort_order')->first(); $img = $mainImage ? $mainImage->image_path : null; } $imagePath = $img ? $img : 'https://placehold.co/200x200?text=No+Image'; @endphp {{ $item->product->name }}

    {{ $item->product->name }}

    ₹{{ number_format($item->price * $item->quantity, 2) }}

    @if($item->variation) @foreach($item->variation->options as $option) {{ $option->attribute_value }} @if(!$loop->last) / @endif @endforeach @endif

    Qty {{ $item->quantity }}

  • @endforeach
@php $subtotal = $cart->items->sum(function ($item) { return $item->price * $item->quantity; }); @endphp
Subtotal
₹{{ number_format($subtotal, 2) }}
Shipping
Free
Add ₹ more for Free Shipping!
You are eligible for Free Shipping!
Discount
-₹
Gift Card
-₹
Points Redeemed
-₹
Total
@push('scripts') @endpush @endsection