@extends(Theme::getThemeNamespace() . '::views.ecommerce.customers.master') @section('content')
{{ __('Order detail :order', ['order' => get_order_code($order->id)]) }}
{{ theme_option('site_title') }}
{{ setting('contact_address') }}
{{ __('Time') }}: {{ $order->created_at->format('h:m d/m/Y') }}

{{ __('Order information') }}

{{ __('Order status') }}: {{ $order->status->label() }}
{{ __('Payment method') }}: {{ $order->payment->payment_channel->label() }}
{{ __('Payment status') }}: {{ $order->payment->status->label() }}
{{ __('Amount') }}: {{ $order->amount_format }}
@if (EcommerceHelper::isTaxEnabled())
{{ __('Tax') }}: {{ format_price($order->tax_amount) }}
@endif
{{ __('Discount') }}: {{ $order->discount_amount_format }} @if ($order->discount_amount) @if ($order->coupon_code) ({!! __('Coupon code: ":code"', ['code' => Html::tag('strong', $order->coupon_code, ['class' => 'badge'])->toHtml()]) !!}) @elseif ($order->discount_description) ({{ $order->discount_description }}) @endif @endif
{{ __('Shipping fee') }}: {{ format_price($order->shipping_amount) }}
@if ($order->description)
{{ __('Note') }}:

{{ $order->description }}

@endif

{{ __('Customer') }}

{{ __('Full Name') }}: {{ $order->address->name }}
{{ __('Phone') }}: {{ $order->address->phone }}
{{ __('Address') }}: {{ $order->full_address }}  

{{ __('Products') }}

@foreach($order->products as $orderProduct) @php $product = get_products([ 'condition' => [ 'ec_products.status' => \Botble\Base\Enums\BaseStatusEnum::PUBLISHED, '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', ], ]); @endphp @endforeach
# {{ __('Image') }} {{ __('Product') }} {{ __('Amount') }} {{ __('Quantity') }} {{ __('Total') }}
{{ $loop->index + 1 }} {{ $orderProduct->product_name }} {{ $orderProduct->product_name }} @if ($product && $product->sku) ({{ $product->sku }}) @endif @if ($product && $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 @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
{{ $orderProduct->amount_format }} {{ $orderProduct->qty }} {{ $orderProduct->total_format }}
@if ($order->canBeCanceled()) @endif
@endsection