@extends(BaseHelper::getAdminMasterLayoutTemplate()) @section('content')
@include('plugins/ecommerce::orders.partials.canceled-alert', compact('order')) {!! apply_filters('ecommerce_order_detail_top', null, $order) !!}
@include('plugins/ecommerce::orders.partials.hbl-order-reference', compact('order')) {{-- Header (summary/status badges etc.) --}} @include('plugins/ecommerce::orders.edit.order-header') {{-- Products table (no edit links unless the user has permission; we won’t pass edit route) --}} @include('plugins/ecommerce::orders.edit.order-products', [ 'editProductRoute' => null, 'isInAdmin' => true, ])
{{-- Order totals/info block (display only) --}} @include('plugins/ecommerce::orders.edit.order-info', ['isInAdmin' => true]) {{-- Read-only: show invoice actions only (non-destructive) --}}
@if ($order->isInvoiceAvailable()) {{ trans('plugins/ecommerce::order.print_invoice') }} {{ trans('plugins/ecommerce::order.download_invoice') }} @elseif ($order->status != \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED) @endif
{{-- Read-only timeline/info (kept fully visible) --}}
{{-- Confirm/cancel/refund/delivery action rows are interactive in edit view. For read-only, we’ll render the status texts but hide the action buttons. --}} @if ($order->status != Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED || $order->is_confirmed)
$order->is_confirmed]) /> @if ($order->is_confirmed) {{ trans('plugins/ecommerce::order.order_was_confirmed') }} @else {{ trans('plugins/ecommerce::order.confirm_order') }} @endif
{{-- no confirm button in view mode --}}
@endif @if ($order->status == Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED || (is_plugin_active('payment') && $order->payment->id))
@if ($order->status == Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED)
{{ trans('plugins/ecommerce::order.order_was_canceled') }} @if($order->cancellation_reason)
{{ trans('plugins/ecommerce::order.cancellation_reason', ['reason' => $order->cancellation_reason_message]) }}
@endif
@endif @if (is_plugin_active('payment') && $order->payment->id && $order->payment->status != \Botble\Payment\Enums\PaymentStatusEnum::REFUNDED)
@if (!$order->payment->status || $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::PENDING) @elseif ($order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED) @endif @if (!$order->payment->status || $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::PENDING) {{ trans('plugins/ecommerce::order.pending_payment') }} @elseif ($order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED) {{ trans('plugins/ecommerce::order.payment_was_accepted', ['money' => format_price($order->payment->amount - $order->payment->refunded_amount)]) }} @elseif ($order->payment->amount - $order->payment->refunded_amount == 0) {{ trans('plugins/ecommerce::order.payment_was_refunded') }} @endif
{{-- no confirm/refund buttons in view mode --}} @endif
@endif @if (EcommerceHelper::countDigitalProducts($order->products) != $order->products->count() && ! EcommerceHelper::isDisabledPhysicalProduct())
@if ($order->status == Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED && !$order->shipment->id)
{{ trans('plugins/ecommerce::order.all_products_are_not_delivered') }}
@else @if (! EcommerceHelper::isDisabledPhysicalProduct() && $order->shipment->id)
{{ trans('plugins/ecommerce::order.delivery') }}
@else
{{ trans('plugins/ecommerce::order.delivery') }}
{{-- no "create shipment" button in view mode --}} @endif @endif
@endif
{{-- Info snippet about digital downloads (pure display) --}} @include('plugins/ecommerce::orders.partials.digital-product-downloads-info', compact('order')) {{-- History remains read-only --}} {{ trans('plugins/ecommerce::order.history') }}
    @foreach ($order->histories()->orderByDesc('id')->get() as $history)
  • $history->user_id])>
    {{ OrderHelper::processHistoryVariables($history) }}
    {{ BaseHelper::formatDateTime($history->created_at) }}
    {{-- dropdown details for refund/confirm can stay; they’re just info --}}
  • @endforeach
{!! apply_filters('ecommerce_order_detail_sidebar_top', null, $order) !!} {{ trans('plugins/ecommerce::order.customer_label') }}
@php $userInfo = $order->user; @endphp @if ($userInfo->id)

{{ $userInfo->completedOrders()->count() }} {{ trans('plugins/ecommerce::order.orders') }}

@endif

{{ $userInfo->name }}

@if ($userInfo->email)

{{ $userInfo->email }}

@endif @if ($userInfo->phone)

{{ $userInfo->phone }}

@endif @if ($order->user->id)

{{ trans('plugins/ecommerce::order.have_an_account_already') }}

@else

{{ trans('plugins/ecommerce::order.dont_have_an_account_yet') }}

@endif
@if ( ! EcommerceHelper::isDisabledPhysicalProduct() && ($order->shippingAddress->country || $order->shippingAddress->state || $order->shippingAddress->city || $order->shippingAddress->address || $order->shippingAddress->email || $order->shippingAddress->phone) ) @if (EcommerceHelper::countDigitalProducts($order->products) != $order->products->count())

{{ trans('plugins/ecommerce::order.shipping_info') }}

{{-- remove edit icon --}}
@include('plugins/ecommerce::orders.shipping-address.detail', [ 'address' => $order->shippingAddress ])
@endif @if ( EcommerceHelper::isBillingAddressEnabled() && $order->billingAddress->id && $order->billingAddress->id != $order->shippingAddress->id )

{{ trans('plugins/ecommerce::order.billing_address') }}

{{-- no edit --}}
@include('plugins/ecommerce::orders.shipping-address.detail', [ 'address' => $order->billingAddress ])
@endif @endif @if ($order->taxInformation)

{{ trans('plugins/ecommerce::order.tax_info.name') }}

{{-- no update button --}}
@include('plugins/ecommerce::orders.tax-information.detail', [ 'tax' => $order->taxInformation ])
@endif @if ($order->referral->exists())

{{ trans('plugins/ecommerce::order.referral') }}

@foreach (['ip','landing_domain','landing_page','landing_params','referral','gclid','fclid','utm_source','utm_campaign','utm_medium','utm_term','utm_content','referrer_url','referrer_domain'] as $field) @if ($order->referral->{$field})
{{ trans('plugins/ecommerce::order.referral_data.' . $field) }}
{{ $order->referral->{$field} }}
@endif @endforeach
@endif @if (is_plugin_active('marketplace') && $order->store->name)

{{ trans('plugins/marketplace::store.store') }}

{{ $order->store->name }}
@endif
{{-- Footer: no reorder/cancel/transfer buttons in view mode --}}
This page is read-only.
{!! apply_filters('ecommerce_order_detail_sidebar_bottom', null, $order) !!}
{!! apply_filters('ecommerce_order_detail_bottom', null, $order) !!}
@endsection {{-- No @push footers for modals or JS actions in view mode --}}