@extends('admin.layouts.app') @section('title', $title) @section('content')
{{method_field('PUT')}} {{csrf_field()}}
@if ($order->payment_error)
Payment Error: {{ $order->payment_error }}
@endif

Order #{{$order->id}} details Date Time: {{$order->created_at}}

General:

Submitted: {{$order->created_at->diffForHumans()}}
@php $statusDetails = getStatusDetails((int)$order->status); @endphp Order Status: {{ $statusDetails['label'] }}

Billing Details:

@if($order->user_id == 0) Guest Order
Name: {{ $order->getMeta('billing_first_name') . ' ' . $order->getMeta('billing_last_name') }}
Email: {!! $order->getMeta('billing_email') ?? 'N/A' !!}
@else Name: {{ $order->billingInfo->first_name . ' ' . $order->billingInfo->last_name }}
Address: {!! $order->billingInfo->address !!}
City: {!! $order->billingInfo->city !!}
State: {!! $order->billingInfo->state->name ?? null !!}
Country: {!! $order->billingInfo->country->name ?? null !!}
Zip code: {!! $order->billingInfo->zip !!}
@endif

Item Purchased:

@foreach ( $order->items as $item ) @endforeach @foreach ( $order->addons as $addon ) @endforeach
Product Quantity Price
{!! $item->name !!} {{ $item->quantity }} {!! ch_format_price( $item->price, $order->currency ) !!}
{!! $addon->name !!} {{ $item->quantity }} {!! ch_format_price( $addon->pivot->price, $order->currency ) !!}
{{-- Custom Checkout Field Values --}} @php $itemsWithFields = $order->items->filter(fn($i) => $i->customFields->isNotEmpty()); @endphp @if($itemsWithFields->isNotEmpty())

Provisioning / Custom Details:

@foreach($itemsWithFields as $item)
{{ $item->name }} @foreach($item->customFields as $cf) @endforeach
{{ ucwords(str_replace('_', ' ', $cf->field_name)) }} {{ $cf->field_value ?? '—' }}
@endforeach
@endif

Payment Details:

Payment method: {{ $order->offline_payment_method ?? $order->payment_method }}
Transaction ID {{ $order->transaction_id }}

Summary

@if($order->discount_amount > 0) @endif
Subtotal: {!! ch_format_price($order->subtotal, $order->currency) !!}
Coupon code {!! $order->discount_code !!}
Coupon amount {!! ch_format_price($order->discount_amount, $order->currency) !!}
Tax {!! ch_format_price($order->tax_amount, $order->currency) !!}
Total {!! ch_format_price($order->total, $order->currency) !!}

Update Order

@if($order->payment_method == 'offline_payments')
@endif
@endsection