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

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

@if($order)
Order Information
Order Number: {{ $order->order_number }}
Shopify Order ID: {{ $order->shopify_order_id }}
Status: {{ ucfirst($order->status) }}
Payment Status: {{ ucfirst(str_replace('_', ' ', $order->financial_status)) }}
Fulfillment Status: {{ ucfirst(str_replace('_', ' ', $order->fulfillment_status)) }}
Created: {{ $order->created_at->format('M d, Y H:i') }}
Updated: {{ $order->updated_at->format('M d, Y H:i') }}
Customer Information
@if($order->contact) @endif
Name: {{ $order->name }}
Email: {{ $order->email ?: 'N/A' }}
Phone: {{ $order->phone ?: 'N/A' }}
Contact: View Contact
Order Items
@forelse(($order->getLineItems() ?: $order->forceDecodeData()['line_items'] ?? []) as $item) @empty @endforelse
Product SKU Quantity Price Total
{{ $item['title'] ?? $item['name'] ?? 'N/A' }} @if(isset($item['variant_title']) && $item['variant_title'])
{{ $item['variant_title'] }} @endif
{{ $item['sku'] ?? 'N/A' }} {{ $item['quantity'] ?? 0 }} {{ $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_price ?? 'N/A' }}
Tax: {{ $order->formatted_total_tax ?? 'N/A' }}
Shipping: {{ $order->formatted_total_shipping_price ?? 'N/A' }}
Discount: {{ $order->formatted_total_discounts ?? 'N/A' }}
Total: {{ $order->formatted_total_price ?? 'N/A' }}
Shipping Information
@if($order->shipping_address)
Name: {{ $order->shipping_address['name'] ?? 'N/A' }}
Address: {{ $order->shipping_address['address1'] ?? '' }}
@if($order->shipping_address['address2']) {{ $order->shipping_address['address2'] }}
@endif {{ $order->shipping_address['city'] ?? '' }}, {{ $order->shipping_address['province'] ?? '' }} {{ $order->shipping_address['zip'] ?? '' }}
{{ $order->shipping_address['country'] ?? '' }}
Phone: {{ $order->shipping_address['phone'] ?? 'N/A' }}
@else
No shipping information available
@endif
Order Notifications
@forelse($order->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->isFailed()) @endif
No notifications found
@else
Order Not Found

The requested order could not be found.

Back to Orders
@endif
@push('scripts') @endpush {{-- Include Contact Edit Modal --}} @include('contact.contact-edit-modal-partial') @endsection