{{-- Header --}}
Back

{{ $order->order_no }}

{{ ucfirst($order->status) }} {{ ucfirst($order->payment_status) }}
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- COD Payment Alert --}} @if(in_array($order->payment_method, ['cash', 'cod']) && $order->payment_status === 'pending' && $order->status === 'delivered')
COD Payment Pending! Order delivered but payment not yet confirmed. Confirm payment
@endif
{{-- Left Column --}}
{{-- Quick Actions --}} @if(!in_array($order->status, ['delivered', 'cancelled']))
@if($order->status === 'pending')
@csrf
@endif @if($order->status === 'confirmed')
@csrf
@endif @if(in_array($order->status, ['confirmed', 'processing']) && !$order->tracking_number) @endif @if($order->status === 'shipped') @endif @if(!in_array($order->status, ['cancelled', 'delivered']))
@csrf
@endif
@endif {{-- Order Items --}}

Order Items ({{ $order->items->count() }})

@foreach($order->items as $item)
@php $image = $item->product->primaryImage ?? $item->product->images->first(); @endphp @if($image) {{ $item->product_name }} @else
@endif
{{ $item->product_name }}
@if($item->variation_name)
{{ $item->variation_name }}
@endif
SKU: {{ $item->sku ?? 'N/A' }}
{{ $item->quantity }} × ₹{{ number_format($item->unit_price, 2) }}
₹{{ number_format($item->total_price, 2) }}
@endforeach
{{-- Order Summary --}}

Order Summary

Subtotal ₹{{ number_format($order->subtotal, 2) }}
@if($order->tax_amount > 0)
Tax ₹{{ number_format($order->tax_amount, 2) }}
@endif
Shipping {{ $order->shipping_fee > 0 ? '₹' . number_format($order->shipping_fee, 2) : 'Free' }}
@if($order->cod_fee > 0)
COD Fee ₹{{ number_format($order->cod_fee, 2) }}
@endif @if($order->discount_amount > 0)
Discount -₹{{ number_format($order->discount_amount, 2) }}
@endif
Total ₹{{ number_format($order->total, 2) }}
{{-- Status History --}}

Order Timeline

@forelse($order->statusHistory->sortByDesc('created_at') as $history)
{{ ucfirst($history->status) }}
{{ $history->created_at->setTimezone('Asia/Kolkata')->format('d M Y, h:i A') }}
@if($history->comment)
{{ $history->comment }}
@endif
@empty

No status history available.

@endforelse
{{-- Right Column --}}
{{-- Customer Info --}}

Customer

Name {{ $order->customer_name }}
@if($order->customer_email)
Email {{ $order->customer_email }}
@endif
{{-- Shipping Address --}}

Shipping Address

{{ $order->customer_name }}
{{ $order->shipping_address }}
{{ $order->shipping_city }}, {{ $order->shipping_state }}
{{ $order->shipping_pincode }}
{{ $order->customer_phone }}
{{-- Payment Info --}}

Payment

Method {{ $order->payment_method_label }}
Status {{ ucfirst($order->payment_status) }}
@if($order->transaction_id)
Transaction ID {{ $order->transaction_id }}
@endif @if($order->paid_at)
Paid At {{ $order->paid_at->format('d M Y, h:i A') }}
@endif @if($invoice)
Invoice {{ $invoice->invoice_number }}
@endif
{{-- Update Payment Form --}} @if($order->payment_status !== 'paid')
Mark Payment
@csrf
@endif
{{-- Shipping Info --}} @if($order->tracking_number)

Shipping

Carrier {{ $order->carrier ?? 'N/A' }}
Tracking # {{ $order->tracking_number }}
@if($order->shipped_at)
Shipped At {{ $order->shipped_at->format('d M Y') }}
@endif
@endif {{-- Order Notes --}} @if($order->customer_notes)

Customer Notes

{{ $order->customer_notes }}

@endif {{-- Update Status Form --}} @if(!in_array($order->status, ['delivered', 'cancelled']))

Update Status

@csrf
@endif
{{-- Shipping Modal --}} {{-- Delivery Confirmation Modal --}}