@extends(BaseHelper::getAdminMasterLayoutTemplate()) @section('content')
@include('plugins/ecommerce::orders.partials.canceled-alert', compact('order'))
{{ trans('plugins/ecommerce::order.order_information') }} {{ $order->code }} @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 {{ $orderProduct->product_name }}
{{ $orderProduct->product_name }} @if ($sku = Arr::get($orderProduct->options, 'sku') ?: ($product && $product->sku ? $product->sku : null))

({{ 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( EcommerceHelper::viewPath('includes.cart-item-options-extras'), ['options' => $orderProduct->options] ) {!! apply_filters(ECOMMERCE_ORDER_DETAIL_EXTRA_HTML, null) !!} @if ($order->shipment->id)

{{ $orderProduct->qty }} {{ trans('plugins/ecommerce::order.completed') }}

@endif
{{ format_price($orderProduct->price) }} x {{ $orderProduct->qty }} {{ format_price($orderProduct->price * $orderProduct->qty) }}
@endforeach
{{ 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) }}
@if (EcommerceHelper::isTaxEnabled()) {{ trans('plugins/ecommerce::order.tax') }} {{ format_price($order->tax_amount) }} @endif {{ trans('plugins/ecommerce::order.total_amount') }} @if (is_plugin_active('payment') && $order->payment->id) $order->payment->status != Botble\Payment\Enums\PaymentStatusEnum::COMPLETED]) class="text-warning"> {{ 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 (is_plugin_active('payment') && $order->payment->id) {{ trans('plugins/ecommerce::order.payment_method') }} {{ $order->payment->payment_channel->label() }} {{ trans('plugins/ecommerce::order.payment_status_label') }} {!! BaseHelper::clean($order->payment->status->toHtml()) !!} @endif @if ($order->proof_file && Storage::disk('local')->exists($order->proof_file)) {{ trans('plugins/ecommerce::order.payment_proof') }} {{ $order->proof_file }} @endif {!! apply_filters('ecommerce_admin_order_extra_info', null, $order) !!}
@if (is_plugin_active('payment') && $order->payment->status == Botble\Payment\Enums\PaymentStatusEnum::REFUNDED) @endif
@if ($order->isInvoiceAvailable()) {{ trans('plugins/ecommerce::order.print_invoice') }} {{ trans('plugins/ecommerce::order.download_invoice') }} @else {{ trans('plugins/ecommerce::order.generate_invoice') }} @endif
{{ trans('plugins/ecommerce::order.save') }}
@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
@if (!$order->is_confirmed)
{{ trans('plugins/ecommerce::order.confirm') }}
@endif
@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
@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])) {{ trans('plugins/ecommerce::order.confirm_payment') }} @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 ) ) {{ trans('plugins/ecommerce::order.refund') }} @endif
@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') }}
{{ trans('plugins/ecommerce::order.delivery') }} @endif @endif
@if (! $order->shipment->id) @else @include('plugins/ecommerce::orders.shipment-detail', [ 'shipment' => $order->shipment, ]) @endif @endif
{{ trans('plugins/ecommerce::order.history') }}
    @foreach ($order->histories()->orderByDesc('id')->get() as $history)
  • $history->user_id])>
    @if (in_array($history->action, ['confirm_payment', 'refund'])) {{ OrderHelper::processHistoryVariables($history) }} @else {{ OrderHelper::processHistoryVariables($history) }} @endif
    {{ BaseHelper::formatDateTime($history->created_at) }}
    @if ($history->action == 'refund' && Arr::get($history->extras, 'amount', 0) > 0) @endif @if (is_plugin_active('payment') && $history->action == 'confirm_payment' && $order->payment) @endif @if ($history->action == 'send_order_confirmation_email') {{ trans('plugins/ecommerce::order.resend') }} @endif
  • @endforeach
{{ trans('plugins/ecommerce::order.customer_label') }}
@php $userInfo = $order->user; @endphp @if ($userInfo->id)

{{ $userInfo->orders()->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 ( $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') }}

@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 )

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

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

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

@if ($order->status !== Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED) @endif
@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
{{ trans('plugins/ecommerce::order.reorder') }} @if ($order->canBeCanceledByAdmin()) {{ trans('plugins/ecommerce::order.cancel') }} @endif
@endsection @pushif($order->status != Botble\Ecommerce\Enums\OrderStatusEnum::CANCELED, 'footer') @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 @if (is_plugin_active('payment')) {{ trans('plugins/ecommerce::order.confirm_payment') }} {{ format_price($order->payment->amount - $order->payment->refunded_amount) }} @include('plugins/ecommerce::orders.refund.modal', [ 'order' => $order, 'url' => route('orders.refund', $order->id), ]) @endif @if ($order->shipment && $order->shipment->id) @include('plugins/ecommerce::shipments.partials.update-status-modal', [ 'shipment' => $order->shipment, ]) @endif @endpushif