@extends('frontend.layouts.app') @push('stylepush') @endpush @section('content')

{{ translate("To track your order please enter your Order ID in the box below and press the “Track Button”. This was given to you on your receipt and in the confirmation email you should have received") }}

@if ($order)

{{ translate('Tracking order lists') }}

  • {{ translate('Order Confirm') }}

  • {{ translate('Picked by courier') }}

  • {{ translate('On The Way') }}

  • {{ translate('Delivered') }}

{{ translate('Order ID') }} : #{{ @$order->order_id }}

{{ translate('Order date') }} :

{{ get_date_time(@$order->created_at, 'd M Y') }}

{{ translate('Shipping by') }} :

{{ $order->shipping_deliverie_id != null ? $order->shipping?->name : 'N/A' }} @if ($order->shipping)
{{ translate('Delivery In') }} : {{ $order->shipping->duration }} {{ translate('Days') }}
@endif

{{ translate('Status') }} :

@if (@$order->status == 1) {{ translate('Order Placed') }} @elseif(@$order->status == 2) {{ translate('Order Confirm') }} @elseif(@$order->status == 3) {{ translate('Picked by courier') }} @elseif(@$order->status == 4) {{ translate('On The Way') }} @elseif(@$order->status == 5) {{ translate('Delivered') }} @elseif($order->status == 6) {{ translate('Order Cancel') }} @endif
@php $subTotal = 0; $originalPrice = 0; $discount = 0; $tax = 0; $totalAmount = 0; @endphp @if ($order->OrderDetails->isNotEmpty())
@foreach ($order->OrderDetails as $orderDetail) @if (@$orderDetail->product) @php $originalPrice += $orderDetail->original_price; $tax += $orderDetail->total_taxes; $discount += $orderDetail->discount; $totalAmount += $orderDetail->total_price; @endphp @endif @endforeach
{{ translate('Product') }} {{ translate('Original Price') }} {{ translate('Tax amount') }} {{ translate('Discount') }} {{ translate('Total Price') }} {{ translate('Status') }} {{ translate('Chat') }}
{{ short_amount($orderDetail->original_price) }} {{ short_amount($orderDetail->total_taxes) }} {{ short_amount($orderDetail->discount) }} {{ short_amount($orderDetail->total_price) }} @php echo order_status_badge($orderDetail->status) @endphp @php $seller = $orderDetail->product ? $orderDetail->product->seller : null; @endphp @if($seller) @else {{translate("N/A")}} @endif
  • {{ translate('Sub Total') }}: {{ short_amount($originalPrice) }}
  • {{ translate('All Taxes') }}: {{ short_amount($tax) }}
  • {{ translate('Total Discount') }}: {{ short_amount($order->discount) }}
  • {{ translate('Shpping charge') }}: {{ short_amount($order->shipping_charge) }}
  • {{ translate('Total') }} :
    {{ short_amount($order->amount) }}
  • @endif
    @if (site_settings('delivery_man_module') == \App\Enums\StatusEnum::true->status() && @$order->deliveryManOrder && @$order->deliveryManOrder->deliveryMan) @if($order->deliveryManOrder->status != \App\Models\DeliveryManOrder::PENDING)

    {{ translate('Deliveryman') }}

    @php $deliveryMan = $order->deliveryManOrder->deliveryMan->load(['ratings']); @endphp
    profile.jpg
    {{ $deliveryMan->first_name . ' ' . $deliveryMan->last_name }}
    @if(site_settings('chat_with_customer') == \App\Enums\StatusEnum::true->status()) @endif
    @php @$deliveryman_rating = $deliveryMan ->ratings ->where('order_id',@$order->id) ->where('user_id',@auth_user('web')->id) ->first(); @$rate = is_null($deliveryman_rating) ? translate('Rate this Deliveryman') : translate('See your Review'); @endphp @if (auth()->user())
    @endif
    @endif @endif

    {{ translate('Billing Info') }}

    @php $user = auth_user('web'); @endphp
    @if (@$order->billingAddress) {{ translate('Address name') }}: {{ @$order->billingAddress->name }} {{ translate('First Name') }}: {{ @$order->billingAddress->first_name }} {{ translate('Last name') }}: {{ @$order->billingAddress->last_name }} {{ translate('Phone') }}: {{ @$order->billingAddress->phone }} {{ translate('Address') }}: {{ @$order->billingAddress->address->address }} {{ translate('Zip') }}: {{ @$order->billingAddress->zip }} {{ translate('Country') }}: {{ @$order->billingAddress->country->name }} {{ translate('State') }}: {{ @$order->billingAddress->state->name }} {{ translate('City') }}: {{ @$order->billingAddress->city->name }} @endif @if (@$order->billing_information) @foreach (@$order->billing_information as $key => $address) {{ k2t($key) }}: {{ $address }} @endforeach @endif
    @if($order->custom_information)

    {{ translate('Custom Info') }}

    @if (@$order->custom_information) @foreach (@$order->custom_information as $key => $address) {{ k2t($key) }}: {{ $address }} @endforeach @endif
    @endif

    {{ translate('Order Info') }}

    {{ translate('Order number') }} : {{ @$order->order_id }} {{ translate('Payment Method') }} : @if($order->wallet_payment == App\Models\Order::WALLET_PAYMENT) {{ translate('Payment VIA Wallet')}} @else @if ($order->payment_type == '2') {{ @$order->paymentMethod ? $order->paymentMethod->name : 'N/A' }} @else {{ translate('Cash On Delivary') }} @endif @endif {{ translate('Total Amount') }} : {{ short_amount($order->amount) }} {{ translate('Payment Status') }} : @if ($order->payment_status == '1') {{ translate('Unpaid') }} @else {{ translate('Paid') }} @endif {{ translate('Order Status') }} : @php echo order_status_badge($order->status) @endphp {{ translate('Date') }} : {{ diff_for_humans($order->created_at) }}
    @if($order->order_type == App\Models\Order::DIGITAL) @php $order = $order->load(['digitalProductOrder']); $orderDetail = $order->digitalProductOrder->load(['digitalProductAttributeValue','digitalProductAttributeValue.digitalProductAttributeValueKey']); $attribute = $orderDetail?->digitalProductAttributeValue; $attributeValues = $orderDetail?->digitalProductAttributeValue?->digitalProductAttributeValueKey; @endphp @if( @$attribute && @$attributeValues )

    {{ translate('Attribute info') }}

    {{translate("Attribute Name")}} : {{@$attribute->name}}
    @foreach (@$attributeValues->where('status',1) as $value )
    {{$value->name ? $value->name : 'N/A' }} :

    @if($value->file ) @endif {{$value->value }}

    @endforeach
    @endif @endif
    @endif
    @if (@$deliveryMan) @endif @endsection