@extends('theme::layouts.app', ['title' => $title ?? trans('account.title|Order Details')]) @section('content')

Order #{{$order->order_reference}}

@php $statusDetails = getStatusDetails($order->status); $statusClass = match((int)$order->status) { 1 => 'status-completed', 0 => 'status-pending', 2 => 'status-processing', 3 => 'status-refunded', 4, 5 => 'status-failed', 6, 7 => 'status-cancelled', default => 'status-default', }; @endphp {{ $statusDetails['label'] }}

{{ __('account.Placed on') }} {{ $order->created_at->format('F j, Y \a\t g:i A') }}

@foreach($order->main_items as $item)
@if($item->product_image) Product @else inventory_2 @endif

{!! $item->name !!}

{!! ch_format_price($item->price, $order->currency) !!}
{{-- v1.2.4--}}
@if(isset($productFiles) && count($productFiles)) @endif
@endforeach @if($order->addon_items->count() > 0)

{{ __('account.Add-ons Included') }}

@foreach($order->addon_items as $addon)
build

{{ $addon->name }}

{!! ch_format_price($addon->price, $order->currency) !!}
@endforeach
@endif
{{-- Custom Checkout Field Values (e.g. domain name for hosting) --}} @php $itemsWithFields = $order->items->filter(fn($i) => $i->relationLoaded('customFields') && $i->customFields->isNotEmpty()); @endphp @if($itemsWithFields->isNotEmpty())

{{ __('account.Service Details') }}

@foreach($itemsWithFields as $item) @if(!$loop->first)
@endif

{{ $item->name }}

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

{{ __('account.Payment Information') }}

{{ __('account.Payment Method') }}

credit_card

{{$order->payment_method_label}}

@if($order->transaction_id)

{{ __('account.Transaction ID') }}: {{$order->transaction_id}}

@endif

{{ __('account.Billing Address') }}

{{$order->billingInfo?->fullName}}
{{$order->billingInfo?->address}}
{{$order->billingInfo?->city}}, {{optional($order->billingInfo->state)->name}} {{optional($order->billingInfo)->zip}}
{{optional($order->billingInfo->country)->name}}

{{ __('account.Price Breakdown') }}

Subtotal {!! ch_format_price($order->subtotal, $order->currency) !!}
@if($order->discount_amount > 0)
Discount {!! $order->discount_code !!} ({!! ch_format_price($order->discount_amount, $order->currency) !!})
@endif @if($order->tax_amount > 0)
Tax {!! ch_format_price($order->tax_amount, $order->currency) !!}
@endif
{{ __('account.Total Paid') }} {!! ch_format_price($order->total, $order->currency) !!}
@endsection