@extends('admin.layout.admin') @section('content')

Order Details (Order ID: {{ $order->id }})


Order Placed On

{{ $order->created_at->format('d M, Y h:i A') }}

Order Items
@php $total = 0; $totalQuantity = 0; @endphp @foreach($order->items as $item) @php $total += $item->quantity * $item->price; $totalQuantity += $item->quantity; @endphp @endforeach
Item Image Quantity Price
@if($item->product && $item->product->getFirstMediaUrl('product_image')) {{ $item->product->name }} @else - @endif {{ $item->quantity ?? 0 }} ${{ number_format($item->price, 2) }}
Total Quantity {{ $totalQuantity }} Total Price: ${{ number_format($total, 2) }}

Shipping Address
@php $state_name = null; if($order->user && $order->user->state) { $state_name = \App\Models\States::where('id', $order->user->state)->value('name'); } @endphp
Address City State Zip Code
{{ $order->user->address ?? '-' }} {{ $order->user->city ?? '-' }} {{ $state_name ?? '-' }} {{ $order->user->zip_code ?? '-' }}

Customer Details

Name: {{ $order->user->name ?? '-' }}

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

Phone: {{ $order->user->phone_number ?? '-' }}

@endsection