@if ($order)
{{ __('Order information') }}

{{ __('Order number') }}: {{ get_order_code($order->id) }}

{{ __('Time') }}: {{ $order->created_at->translatedFormat('h:m d/m/Y') }}

{{ __('Order status') }}: {{ $order->status->label() }}

{{ __('Payment method') }}: {{ $order->payment->payment_channel->label() }}

{{ __('Payment status') }}: {{ $order->payment->status->label() }}

@if ($order->description)

{{ __('Note') }}: {{ $order->description }}

@endif
{{ __('Customer information') }}

{{ __('Full Name') }}: {{ $order->address->name }}

{{ __('Phone') }}: {{ $order->address->phone }}

{{ __('Address') }}: {{ $order->address->address }}

{{ __('City') }}: {{ $order->address->city_name }}

{{ __('State') }}: {{ $order->address->state_name }}

{{ __('Country') }}: {{ $order->address->country_name }}

@if (EcommerceHelper::isZipCodeEnabled())

{{ __('Zip code') }}: {{ $order->address->zip_code }}

@endif

{{ __('Order detail') }}
@foreach($order->products as $key => $orderProduct) @php $product = get_products([ 'condition' => [ 'ec_products.id' => $orderProduct->product_id, ], 'take' => 1, 'select' => [ 'ec_products.id', 'ec_products.images', 'ec_products.name', 'ec_products.price', 'ec_products.sale_price', 'ec_products.sale_type', 'ec_products.start_date', 'ec_products.end_date', 'ec_products.sku', 'ec_products.is_variation', 'ec_products.status', 'ec_products.order', 'ec_products.created_at', ], 'include_out_of_stock_products' => true, ]); @endphp @endforeach
# {{ __('Image') }} {{ __('Product') }} {{ __('Amount') }} {{ __('Quantity') }} {{ __('Total') }}
{{ $key + 1 }} {{ $orderProduct->product_name }} @if ($product) {{ $product->original_product->name }} @if ($product->sku) ({{ $product->sku }}) @endif @if ($product->is_variation)

@php $attributes = get_product_attributes($product->id) @endphp @if (!empty($attributes)) @foreach ($attributes as $attribute) {{ $attribute->attribute_set_title }} : {{ $attribute->title }}@if (!$loop->last) , @endif @endforeach @endif

@endif @else {{ $orderProduct->product_name }} @endif @if (!empty($orderProduct->options) && is_array($orderProduct->options)) @foreach($orderProduct->options as $option) @if (!empty($option['key']) && !empty($option['value']))

{{ $option['key'] }}: {{ $option['value'] }}

@endif @endforeach @endif
{{ format_price($orderProduct->price) }} {{ $orderProduct->qty }} {{ format_price($orderProduct->price * $orderProduct->qty) }}

{{ __('Shipping fee') }}: {{ format_price($order->shipping_amount) }}

{{ __('Total Amount') }}: {{ format_price($order->amount) }}

@if ($order->shipment->id)
{{ __('Shipping Information') }}:

{{ __('Shipping Status') }}: {!! BaseHelper::clean($order->shipment->status->toHtml()) !!}

@if ($order->shipment->shipping_company_name)

{{ __('Shipping Company Name') }}: {{ $order->shipment->shipping_company_name }}

@endif @if ($order->shipment->tracking_id)

{{ __('Tracking ID') }}: {{ $order->shipment->tracking_id }}

@endif @if ($order->shipment->tracking_link)

{{ __('Tracking Link') }}: {{ $order->shipment->tracking_link }}

@endif @if ($order->shipment->note)

{{ __('Delivery Notes') }}: {{ $order->shipment->note }}

@endif @if ($order->shipment->estimate_date_shipped)

{{ __('Estimate Date Shipped') }}: {{ $order->shipment->estimate_date_shipped }}

@endif @if ($order->shipment->date_shipped)

{{ __('Date Shipped') }}: {{ $order->shipment->date_shipped }}

@endif @endif @elseif (request()->input('order_id') || request()->input('email'))

{{ __('Order not found!') }}

@endif