@extends(BaseHelper::getAdminMasterLayoutTemplate()) @section('content')
@if ($order->status == \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED)

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

{{ trans('plugins/ecommerce::order.order_was_canceled_at') }} {{ $order->updated_at->format('H:i d/m/Y') }}.
@endif
@if ($order->completed_at) {{ trans('plugins/ecommerce::order.completed') }} @else {{ trans('plugins/ecommerce::order.uncompleted') }} @endif
@foreach ($order->products as $orderProduct) @php $product = $orderProduct->product->original_product; @endphp @endforeach
{{ $orderProduct->product_name }}
{{ $orderProduct->product_name }}   @if ($sku = Arr::get($orderProduct->options, 'sku')) ({{ trans('plugins/ecommerce::order.sku') }}: {{ $sku }}) @endif @if ($attributes = Arr::get($orderProduct->options, 'attributes'))

{{ $attributes }}

@endif @if (! empty($orderProduct->product_options) && is_array($orderProduct->product_options)) {!! render_product_options_html($orderProduct->product_options, $orderProduct->price) !!} @endif @include('plugins/ecommerce::themes.includes.cart-item-options-extras', ['options' => $orderProduct->options]) {!! apply_filters(ECOMMERCE_ORDER_DETAIL_EXTRA_HTML, null) !!} @if ($order->shipment->id) @endif
{{ format_price($orderProduct->price) }}
x {{ $orderProduct->qty }} {{ format_price($orderProduct->price * $orderProduct->qty) }}
@if (EcommerceHelper::isTaxEnabled()) @endif {!! apply_filters('ecommerce_admin_order_extra_info', null, $order) !!} @if (is_plugin_active('payment') && $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::REFUNDED) @endif
{{ trans('plugins/ecommerce::order.quantity') }} {{ number_format($order->products->sum('qty')) }}
{{ trans('plugins/ecommerce::order.sub_amount') }} {{ format_price($order->sub_total) }}

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

@if ($order->coupon_code)

{!! trans('plugins/ecommerce::order.coupon_code', ['code' => Html::tag('strong', $order->coupon_code)->toHtml()]) !!}

@elseif ($order->discount_description)

{{ $order->discount_description }}

@endif

{{ format_price($order->discount_amount) }}

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

{{ $order->shipping_method_name }}

{{ $weight }} {{ ecommerce_weight_unit(true) }}

{{ format_price($order->shipping_amount) }}

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

{{ format_price($order->tax_amount) }}

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

@if (is_plugin_active('payment') && $order->payment->id)

{{ $order->payment->payment_channel->label() }}

@endif
@if (is_plugin_active('payment') && $order->payment->id) {{ format_price($order->amount) }} @else {{ format_price($order->amount) }} @endif
{{ trans('plugins/ecommerce::order.paid_amount') }} @if (is_plugin_active('payment') && $order->payment->id) {{ format_price($order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED ? $order->payment->amount : 0) }} @else {{ format_price(is_plugin_active('payment') && $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED ? $order->payment->amount : 0) }} @endif

@if ($order->isInvoiceAvailable()) @else {{ trans('plugins/ecommerce::order.generate_invoice') }} @endif
@if ($order->status != \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED || $order->is_confirmed)
@if ($order->is_confirmed) {{ trans('plugins/ecommerce::order.order_was_confirmed') }} @else {{ trans('plugins/ecommerce::order.confirm_order') }} @endif
@if (!$order->is_confirmed)
@endif
@endif
@if ($order->status == \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED)
{{ trans('plugins/ecommerce::order.order_was_canceled') }}
@elseif (is_plugin_active('payment') && $order->payment->id)
@if (!$order->payment->status || $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::PENDING) @elseif ($order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED || $order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::PENDING) @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
@if (!$order->payment->status || in_array($order->payment->status, [\Botble\Payment\Enums\PaymentStatusEnum::PENDING]))
@endif @if ($order->payment->status == \Botble\Payment\Enums\PaymentStatusEnum::COMPLETED && (($order->payment->amount - $order->payment->refunded_amount > 0) || ($order->products->sum('qty') - $order->products->sum('restock_quantity') > 0)))
@endif @endif
@if (EcommerceHelper::countDigitalProducts($order->products) != $order->products->count())
@if ($order->status == \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED && !$order->shipment->id)
{{ trans('plugins/ecommerce::order.all_products_are_not_delivered') }}
@else @if ($order->shipment->id)
{{ trans('plugins/ecommerce::order.delivery') }}
@else
{{ trans('plugins/ecommerce::order.delivery') }}
@endif @endif
@if (!$order->shipment->id) @else @include('plugins/ecommerce::orders.shipment-detail', ['shipment' => $order->shipment]) @endif @endif
@foreach ($order->histories()->orderBy('id', 'DESC')->get() as $history)
@if (in_array($history->action, ['confirm_payment', 'refund'])) {{ OrderHelper::processHistoryVariables($history) }} @else {{ OrderHelper::processHistoryVariables($history) }} @endif
@if ($history->action == 'refund' && Arr::get($history->extras, 'amount', 0) > 0)
@if ($history->user->name) @endif
{{ trans('plugins/ecommerce::order.order_number') }} {{ $order->code }}
{{ trans('plugins/ecommerce::order.description') }} {{ $history->description . ' ' . trans('plugins/ecommerce::order.from') . ' ' . $order->payment->payment_channel->label() }}
{{ trans('plugins/ecommerce::order.amount') }} {{ format_price(Arr::get($history->extras, 'amount', 0)) }}
{{ trans('plugins/ecommerce::order.status') }} {{ trans('plugins/ecommerce::order.successfully') }}
{{ trans('plugins/ecommerce::order.transaction_type') }} {{ trans('plugins/ecommerce::order.refund') }}
{{ trans('plugins/ecommerce::order.staff') }} {{ $history->user->name ?: trans('plugins/ecommerce::order.n_a') }}
{{ trans('plugins/ecommerce::order.refund_date') }} {{ $history->created_at }}
@endif @if (is_plugin_active('payment') && $history->action == 'confirm_payment' && $order->payment)
@if ($history->user->name) @endif
{{ trans('plugins/ecommerce::order.order_number') }} {{ $order->code }}
{{ trans('plugins/ecommerce::order.description') }} {!! trans('plugins/ecommerce::order.mark_payment_as_confirmed', ['method' => $order->payment->payment_channel->label()]) !!}
{{ trans('plugins/ecommerce::order.transaction_amount') }} {{ format_price($order->payment->amount) }}
{{ trans('plugins/ecommerce::order.payment_gateway') }} {{ $order->payment->payment_channel->label() }}
{{ trans('plugins/ecommerce::order.status') }} {{ trans('plugins/ecommerce::order.successfully') }}
{{ trans('plugins/ecommerce::order.transaction_type') }} {{ trans('plugins/ecommerce::order.confirm') }}
{{ trans('plugins/ecommerce::order.staff') }} {{ $history->user->name ?: trans('plugins/ecommerce::order.n_a') }}
{{ trans('plugins/ecommerce::order.payment_date') }} {{ $history->created_at }}
@endif @if ($history->action == 'send_order_confirmation_email') @endif
@endforeach
{{ $order->address->name }}
@php $userInfo = $order->address->id ? $order->address : $order->user; @endphp
{{ $userInfo->name }}
@if ($userInfo->id)
{{ $order->user->orders()->count() }} {{ trans('plugins/ecommerce::order.orders') }}
@endif
    @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($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())
@if ($order->status != \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED) @endif
    @include('plugins/ecommerce::orders.shipping-address.detail', ['address' => $order->shippingAddress])
@endif @if (EcommerceHelper::isBillingAddressEnabled() && $order->billingAddress->id && $order->billingAddress->id != $order->shippingAddress->id)
    @include('plugins/ecommerce::orders.shipping-address.detail', ['address' => $order->billingAddress])
@endif
@endif @if($order->taxInformation)
@if ($order->status !== \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED) @endif
    @include('plugins/ecommerce::orders.tax-information.detail', ['tax' => $order->taxInformation])
@endif @if ($order->referral()->count())
    @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') }}
@endif
@if ($order->status != \Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED) {!! trans('plugins/ecommerce::order.resend_order_confirmation_description', ['email' => $order->user->id ? $order->user->email : $order->address->email]) !!} {!! trans('plugins/ecommerce::order.cancel_shipping_confirmation_description') !!} @include('plugins/ecommerce::orders.shipping-address.form', ['address' => $order->address, 'orderId' => $order->id, 'url' => route('orders.update-shipping-address', $order->address->id ?? 0)]) @if($order->taxInformation) @include('plugins/ecommerce::orders.tax-information.form', ['tax' => $order->taxInformation, 'orderId' => $order->id]) @endif {!! trans('plugins/ecommerce::order.cancel_order_confirmation_description') !!} @if (is_plugin_active('payment')) {!! trans('plugins/ecommerce::order.confirm_payment_confirmation_description', ['method' => $order->payment->payment_channel->label()]) !!} @include('plugins/ecommerce::orders.refund.modal', ['order' => $order, 'url' => route('orders.refund', $order->id)]) @endif @if ($order->shipment && $order->shipment->id) @include('plugins/ecommerce::orders.shipping-status-modal', ['shipment' => $order->shipment, 'url' => route('ecommerce.shipments.update-status', $order->shipment->id)]) @endif @endif
@stop