@extends('Admin.layout.app') @section('content')
{{-- PAGE TITLE --}}

Order #{{ $order->id }}

← Back
{{-- TOP CARDS --}}
{{-- ORDER INFO --}}
Order Information

Order ID: #{{ $order->id }}

Status: @if($order->delivery_status == 'delivered') Delivered @elseif($order->delivery_status == 'cancelled') Cancelled @else Pending @endif

Date: {{ \Carbon\Carbon::createFromTimestamp($order->created_at)->format('d M Y h:i A') }}

Payment: {{ $order->payment_method ?? 'COD' }}

Total: Rs {{ number_format($order->grand_total, 2) }}

{{-- CUSTOMER INFO --}}
Customer Information

Name: {{ $order->user->first_name ?? '' }} {{ $order->user->last_name ?? '' }}

Email: {{ $order->user->email ?? '' }}

{{-- SHIPPING --}}
Shipping Address

{{ $order->shipping_address['name'] ?? '' }}

{{ $order->shipping_address['address'] ?? '' }}

{{ $order->shipping_address['city'] ?? '' }}, {{ $order->shipping_address['state'] ?? '' }}

{{ $order->shipping_address['country'] ?? '' }} - {{ $order->shipping_address['postal_code'] ?? '' }}

Phone: {{ $order->shipping_address['phone'] ?? '' }}

{{-- PRODUCTS TABLE --}}
Ordered Products
@php $grandTotal = 0; @endphp @foreach($order->orderDetails as $key => $item) @php $total = $item->price * $item->quantity; $grandTotal += $total; @endphp @endforeach
# Product Price Qty Total
{{ $key + 1 }} {{ $item->product->name ?? 'Deleted Product' }} {{ $item->variation ?? ''}} Rs. {{ $item->price }} {{ $item->quantity }} Rs. {{ $total }}
Grand Total Rs. {{ $grandTotal }}
{{-- Buttons --}}
{{--confirmation modal--}} {{--cancle modal--}} @endsection