@if ($order) @php $version = get_cms_version(); Theme::asset()->add('front-ecommerce-css', 'vendor/core/plugins/ecommerce/css/front-ecommerce.css', version: $version); @endphp
{{ __('Tracking Order No -') }} {{ $order->code ?? '-' }} ({{ $order->created_at ? $order->created_at->translatedFormat('d M Y H:i:s') : '-' }})
@php $status = (string) $order->status; $statusSteps = [ 'pending' => 1, 'confirmed' => 2, 'picked_up' => 3, 'on_the_way' => 4, 'delivered' => 5, ]; $currentStep = $statusSteps[$status ?? 'pending'] ?? 0; // Step titles and icons $stepDetails = [ ['title' => 'Pending Order', 'icon' => 'mdi-cart'], ['title' => 'Confirmed Order', 'icon' => 'mdi-repeat'], ['title' => 'Picked Up Order', 'icon' => 'mdi-gift'], ['title' => 'On The Way Order', 'icon' => 'mdi-truck-delivery'], ['title' => 'Order Delivered', 'icon' => 'mdi-hail'], ]; @endphp
@foreach ($stepDetails as $index => $step)

{{ $step['title'] }}

@endforeach
!$order->address->name && $order->user_id === 104, 'col-md-12' => $order->address->name && $order->user_id === 104, 'col-md-6' => $order->address->name && $order->user_id !== 104, ])>
{{ __('Order Information') }}
{{ __('Order number') }}: {{ $order->code }}
{{ __('Date & Time') }}: {{ $order->created_at->translatedFormat('d M Y H:i:s') }}
{{ __('Customer Name') }}: {{ $order->user->name ?? ($order->address->name ?? '-') }}
{{ __('Email') }}: @if ($order->user_id === 104) - @else {{ $order->user->email ?? ($order->address->email ?? '-') }} @endif
{{--
{{ __('Order status') }}: {{ $order->status->label() }}
--}} @if ($order->cancellation_reason)
{{ __('Cancellation Reason') }}: {{ $order->cancellation_reason_message }}
@endif @if (is_plugin_active('payment') && $order->payment_method)
{{ __('Payment method') }}: {{ sales_payment_method()[$order->payment_method] ?? __('Unknown') }}
{{ __('Payment status') }}: {!! BaseHelper::clean($order->payment->status->toHtml()) !!}
@endif @if ($order->description)
{{ __('Note') }}: {{ $order->description }}
@endif
{{ __('Total Products') }}: {{ $order->products->count() ?? 0 }}
{{ __('Total Price') }}: {{ format_price($order->sub_total ?? 0) }}
{{ __('Tax Amount') }}: {{ format_price($order->tax_amount ?? 0) }}
@php $termsIds = $order->terms_conditions ? json_decode($order->terms_conditions, true) : []; $terms = $termsIds ? \App\Models\EcTermCondition::whereIn('id', $termsIds)->get() : collect(); @endphp @if ($terms->isNotEmpty())
{{ __('Terms & Conditions') }}: @foreach ($terms as $term) @if ($term->description)
{!! $term->description !!}
@endif @endforeach
@endif
@if ($order->address->name)
$order->user_id === 104, 'col-md-6' => $order->user_id !== 104, ])>
{{ __('Shipping Address') }}
{{ __('Full Name') }}: {{ $order->address->name }}
{{ __('Phone') }}: {{ $order->address->phone }}
{{ __('Address') }}: {{ $order->address->full_address }}
@if (!EcommerceHelper::isDisabledPhysicalProduct() && $order->shipment->id) {{--
{{ __('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
@php $billing = $order->customerBillingAddress ?? null; $billingExists = $billing && $billing->name; $shippingJson = $order->shipping_address ? json_decode($order->shipping_address, true) : null; // Decide source $addressSource = $billingExists ? $billing : $shippingJson; // Build full address if ($billingExists) { $fullAddress = $billing->full_address ?? trim( ($billing->address ?? '') . ($billing->locationCity ? ', ' . $billing->locationCity->name : '') . ($billing->locationState ? ', ' . $billing->locationState->name : '') . ($billing->locationCountry ? ', ' . $billing->locationCountry->name : '') . ($billing->zip_code ? ', ' . $billing->zip_code : '') ); } elseif ($shippingJson) { $jsonCity = !empty($shippingJson['city']) ? \Botble\Location\Models\City::find(intval($shippingJson['city'])) : null; $jsonState = !empty($shippingJson['state']) ? \Botble\Location\Models\State::find(intval($shippingJson['state'])) : null; $jsonCountry = !empty($shippingJson['country']) ? \Botble\Location\Models\Country::find(intval($shippingJson['country'])) : null; $fullAddress = ($shippingJson['address'] ?? ''); $fullAddress .= $jsonCity ? ', ' . $jsonCity->name : ''; $fullAddress .= $jsonState ? ', ' . $jsonState->name : ''; $fullAddress .= $jsonCountry ? ', ' . $jsonCountry->name : ''; $fullAddress .= !empty($shippingJson['postal_code']) ? ', ' . $shippingJson['postal_code'] : ''; } else { $fullAddress = '-'; } @endphp
{{ __('Billing Address') }}
{{ __('Full Name') }}: {{ $billingExists ? $billing->name : ($shippingJson['name'] ?? '-') }}
{{ __('Phone') }}: {{ $billingExists ? $billing->phone : ($shippingJson['phone'] ?? '-') }}
{{ __('Address') }}: {!! nl2br(e($fullAddress)) !!}
@endif
{{ __('Products') }}
@foreach ($order->products as $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', ], ]); @endphp @endforeach
{{ __('Product') }} {{ __('Price') }} {{ __('Quantity') }} {{ __('Total') }}
{{ $orderProduct->product_name }}
@if ($product && $product->original_product?->url) {!! BaseHelper::clean($orderProduct->product_name) !!} @else {!! BaseHelper::clean($orderProduct->product_name) !!} @endif
@if ($sku = Arr::get($orderProduct->options, 'sku')) SKU: {{ $sku }} @endif @if ($attributes = Arr::get($orderProduct->options, 'attributes'))
{{ $attributes }} @endif
{{ $orderProduct->amount_format }} {{ $orderProduct->qty }} {{ $orderProduct->total_format }}
@if (EcommerceHelper::isTaxEnabled() && (float) $order->tax_amount) @endif @if ((float) $order->charges_totalamount) @endif @if ((float) $order->discount_amount) @endif {{-- @if ( (float) $order->shipping_amount && EcommerceHelper::countDigitalProducts($order->products) != $order->products->count()) @endif --}} @if ($order->shipping_method) @endif
{{ __('Order Summary') }} {{ __('Total') }}
{{ __('Subtotal') }} {{ format_price($order->amount) }}
{{ __('Tax') }} {{ format_price($order->tax_amount) }}
{{ __('Charges Amount') }} {{ format_price($order->charges_totalamount) }}
{{ __('Discount') }} -{{ format_price($order->discount_amount) }}
{{ __('Shipping fee') }} {{ format_price($order->shipping_amount) }}
@if ($order->pick_up_shipping_location) {{ __('Pickup Location') }}: @else {!! BaseHelper::html( __('Shipping Method and fee') . ($order->is_free_shipping ? ' (' . __('Using coupon code') . ': ' . $order->coupon_code . ')' : ''), ) !!}: @endif @if ($order->pick_up_shipping_location) {{ $order->pick_up_shipping_location }} @else {{ BaseHelper::html( $order->shipping_method_name . ((float) $order->shipping_amount ? ' - ' . format_price($order->shipping_amount) : ' - ' . __('Free')) ) }} @endif
{{ __('Total Amount') }} {{ format_price($order->sub_total) }}
{{-- @if (!EcommerceHelper::isDisabledPhysicalProduct() && $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')) @endif