@extends('layouts.app') @section('title', 'Order Details') @push('head') @endpush @section('content')

Order Details - {{ $order->order_number }}

@if($order)
{{ $order->items_count }}

Items

{{ $order->total_items_quantity }}

Total Quantity

{{ $order->formatted_total_price }}

Total Amount

{{ $notifications->count() }}

Notifications

Order Information
Order Number: {{ $order->order_number }}
WooCommerce Order ID: {{ $order->woocommerce_order_id }}
Status: {{ ucfirst($order->status) }}
Payment Status: {{ $order->isPaid() ? 'Paid' : 'Pending' }}
Total: {{ $order->formatted_total_price }}
Currency: {{ strtoupper($order->currency) }}
Created: {{ $order->created_at->format('M d, Y H:i') }}
Updated: {{ $order->updated_at->format('M d, Y H:i') }}
Customer Information
Name: {{ $order->customer_name }}
Email: {{ $order->customer_email }}
Phone: {{ $order->customer_phone }}
Payment Method: {{ $order->payment_method }}
Order Items
@forelse($order->order_items as $item) @empty @endforelse
Product SKU Quantity Price Total
{{ $item['name'] ?? 'N/A' }} @if(isset($item['variation_id']))
Variation ID: {{ $item['variation_id'] }} @endif
{{ $item['sku'] ?? 'N/A' }} {{ $item['quantity'] ?? 0 }} {{ isset($item['price']) ? $order->currency . ' ' . number_format($item['price'], 2) : 'N/A' }} {{ isset($item['price'], $item['quantity']) ? $order->currency . ' ' . number_format($item['price'] * $item['quantity'], 2) : 'N/A' }}
No items found
Order Summary
Subtotal: {{ $order->formatted_subtotal }}
Tax: {{ $order->formatted_tax_total }}
Shipping: {{ $order->formatted_shipping_total }}
Discount: {{ $order->formatted_discount_total }}
Total: {{ $order->formatted_total_price }}
Shipping Information
@if(isset($order->order_data['shipping']) && !empty($order->order_data['shipping']))
Name: {{ $order->order_data['shipping']['first_name'] ?? '' }} {{ $order->order_data['shipping']['last_name'] ?? '' }}
Address: {{ $order->order_data['shipping']['address_1'] ?? '' }}
@if(!empty($order->order_data['shipping']['address_2'])) {{ $order->order_data['shipping']['address_2'] }}
@endif {{ $order->order_data['shipping']['city'] ?? '' }}, {{ $order->order_data['shipping']['state'] ?? '' }} {{ $order->order_data['shipping']['postcode'] ?? '' }}
{{ $order->order_data['shipping']['country'] ?? '' }}
Phone: {{ $order->order_data['shipping']['phone'] ?? 'N/A' }}
@else
No shipping information available
@endif
Billing Information
@if(isset($order->order_data['billing']) && !empty($order->order_data['billing']))
Name: {{ $order->order_data['billing']['first_name'] ?? '' }} {{ $order->order_data['billing']['last_name'] ?? '' }}
Address: {{ $order->order_data['billing']['address_1'] ?? '' }}
@if(!empty($order->order_data['billing']['address_2'])) {{ $order->order_data['billing']['address_2'] }}
@endif {{ $order->order_data['billing']['city'] ?? '' }}, {{ $order->order_data['billing']['state'] ?? '' }} {{ $order->order_data['billing']['postcode'] ?? '' }}
{{ $order->order_data['billing']['country'] ?? '' }}
Phone: {{ $order->order_data['billing']['phone'] ?? 'N/A' }}
Email: {{ $order->order_data['billing']['email'] ?? 'N/A' }}
@else
No billing information available
@endif
Order Notifications
@forelse($notifications as $notification) @empty @endforelse
Type Status Sent At Delivered At Read At Actions
{{ ucfirst(str_replace('_', ' ', $notification->notification_type)) }} {{ ucfirst($notification->status) }} {{ $notification->sent_at ? $notification->sent_at->format('M d, Y H:i') : 'N/A' }} {{ $notification->delivered_at ? $notification->delivered_at->format('M d, Y H:i') : 'N/A' }} {{ $notification->read_at ? $notification->read_at->format('M d, Y H:i') : 'N/A' }} @if($notification->status === 'failed') @endif
No notifications found
@else
Order Not Found

The requested order could not be found.

Back to Orders
@endif
@push('scripts') @endpush @endsection