@extends('layout.template') @section('title','Order Details') @section('content')

Order Details

{{-- ORDER SUMMARY --}}

Order ID: {{ $order['order_number'] }}

Date: {{ $order['order_date'] }}

Status: {{ ucfirst($order['status']) }}

Total: ₹{{ number_format($order['amounts']['total'],2) }}

Payment: {{ strtoupper($order['payment']['method']) }} ({{ ucfirst($order['payment']['status']) }})

{{-- TRACKING / COURIER --}}
Courier: {{ $order['courier']['name'] }}

Track Shipment

@php $steps = ['placed','processing','shipped','delivered']; $currentStatus = $order['status']; $currentIndex = array_search($currentStatus, $steps); @endphp {{-- 🔥 TIMELINE --}}
@foreach($steps as $index => $step) @php $class = ''; if ($index < $currentIndex) $class='completed' ; elseif ($index==$currentIndex) $class='active' ; @endphp
{{ ucfirst($step) }}
@endforeach
{{-- ORDER ITEMS --}}
Items
@foreach($order['items'] as $item)
{{ $item['name'] }}
Qty: {{ $item['quantity'] }}
₹{{ number_format($item['total'],2) }}
@endforeach
{{-- PRICE DETAILS --}}
Price Details
Subtotal ₹{{ number_format($order['amounts']['sub_total'],2) }}
Delivery Fee ₹{{ number_format($order['amounts']['delivery_fee'],2) }}
Discount - ₹{{ number_format($order['amounts']['discount'],2) }}

Total ₹{{ number_format($order['amounts']['total'],2) }}
{{-- ADDRESSES --}}
Billing Address

{{ $order['billing_address']['name'] }}

{{ $order['billing_address']['address_line1'] }}

{{ $order['billing_address']['address_line2'] }}

{{ $order['billing_address']['city'] }}, {{ $order['billing_address']['state'] }}

{{ $order['billing_address']['pincode'] }}

{{ $order['billing_address']['phone'] }}

Shipping Address

{{ $order['shipping_address']['name'] }}

{{ $order['shipping_address']['address_line1'] }}

{{ $order['shipping_address']['address_line2'] }}

{{ $order['shipping_address']['city'] }}, {{ $order['shipping_address']['state'] }}

{{ $order['shipping_address']['pincode'] }}

{{ $order['shipping_address']['phone'] }}

{{-- 🔥 REVIEW SECTION (ONLY IF DELIVERED) --}} @if($order['status'] == 'delivered')
Write a Review
@csrf {{-- SELECT PRODUCT --}}
{{-- STAR RATING --}}
@for($i = 5; $i >= 1; $i--) @endfor
{{-- REVIEW TEXT --}}
{{-- IMAGE UPLOAD --}}
@endif
{{-- ITEMS --}} @endsection