@extends('frontend.layouts.app') @section('title', 'Order #' . $order->order_number . ' - ShopNow') @section('content')

Order #{{ $order->order_number }}

← Back to Orders
Order Items
@foreach($order->items ?? [] as $item)
{{ optional($item->product)->name }}

Qty: {{ $item->quantity }}

Rs. {{ number_format(($item->price ?? 0) * $item->quantity, 2) }}
@endforeach
@if($order->shipment)
Shipping Address

{{ $order->shipment->recipient_name }}

{{ $order->shipment->street }}, {{ $order->shipment->city }}

Phone: {{ $order->shipment->phone }}

@endif
Order Summary
Status @php $statusName = strtolower($order->status ?? 'pending'); $badgeClass = 'bg-warning text-dark'; if (str_contains($statusName, 'deliver')) $badgeClass = 'bg-success'; if (str_contains($statusName, 'cancel')) $badgeClass = 'bg-danger'; if (str_contains($statusName, 'return')) $badgeClass = 'bg-dark'; if (str_contains($statusName, 'ship')) $badgeClass = 'bg-info'; if (str_contains($statusName, 'confirm')) $badgeClass = 'bg-primary'; @endphp {{ $order->status ?? 'Pending' }}
Order Date {{ $order->created_at->format('M d, Y') }}
Subtotal Rs. {{ number_format($order->total_amount ?? 0, 2) }}
Delivery Rs. {{ number_format($order->delivery_charge ?? 0, 2) }}
@if($order->discount_amount)
Discount - Rs. {{ number_format($order->discount_amount, 2) }}
@endif
Total Rs. {{ number_format($order->grand_total ?? 0, 2) }}
@php $canCancel = $order->canBeCancelled(); @endphp @if($canCancel) @endif

Payment Method: {{ strtoupper($order->payment_mode ?? 'N/A') }}

Payment Status: {{ ucfirst($order->payment_status ?? 'pending') }}

@if($order->canBeCancelled()) @endif @endsection