@extends('layouts.index') @section('content')
{{-- Breadcrumb Section --}} @php $pages = [] ; $page = [] ; $page['title'] = __('lang.home') ; $page['route'] = route('home') ; $page['color'] = 'text_3' ; $pages[] = $page ; $page['title'] = __('lang.myAccount') ; $page['route'] = 'javascript:void(0)' ; $page['color'] = 'text_3' ; $pages[] = $page ; $page['title'] = __('lang.myOrders') ; $page['route'] = route('getOrders') ; $page['color'] = 'text_3' ; $pages[] = $page ; $page['title'] = __('lang.show') ; $page['route'] = 'javascript:void(0)' ; $page['color'] = 'text_1' ; $pages[] = $page ; @endphp @include('components.breadcrumb',$pages)
@include('includes.errors')
@include('auth.account-menu',['activePage'=>'my_orders','route'=>'getOrders'])
{{ __('lang.orderNo') }}: {{ $order->orders_no }} @if($order->rating && $account->accounts_show_orders_ratings == '1') @include('includes.rating-star',['value'=>$order->rating->ratings_value]) @endif
{{ __('lang.orderStatus') }} : {{__('lang.orders_status_'.$order->orders_status) }}
@if(isset($shipping_status) && $shipping_status) {{ __('lang.ShippingStatus') }} : {{ $shipping_status }} @endif
@if( $order->orders_status == '4' && $account->accounts_show_orders_ratings == '1') @if($order->rating )
{{ __('lang.ratings_service') }}
@include('includes.rating-star',['value'=>$order->rating->ratings_service])
{{ __('lang.ratings_delivery') }}
@include('includes.rating-star',['value'=>$order->rating->ratings_delivery])
@else {{ __('lang.ratingOrder') }} @endif @include('includes.orderRatingModal',['order'=>$order ]) @endif @if($account->accounts_show_product_delivery_period && $order->expected_delivery_date_from && $order->expected_delivery_date_to)

{{__('lang.expected_delivery_date_range',["from" => $order->expected_delivery_date_from, "to" => $order->expected_delivery_date_to])}}
@endif
{{ __('lang.price') }}
@if($account->accounts_show_points)
{{ __('lang.points') }}
@endif
{{ __('lang.quantity') }}
{{ __('lang.totalPrice') }}
@foreach ($order->items as $key => $item)
@if($item->choice && is_array($item->choice->images) && sizeof($item->choice->images) > 0 && trim($item->choice->images[0]) != '') {{ $item->product->products_title }} @else {{ $item->product->products_title }} @endif
{{ $item->product->products_title }}
@if($item->choice) @if($item->choice->choices && sizeof($item->choice->choices ) > 0) {{ __('lang.choice') }}: @foreach ($item->choice->choices as $size) {{ $size->trans[0]->choices_title }} @endforeach @endif @endif
@if(isset($products_rating) && $products_rating && $account->accounts_show_products_ratings == '1') @foreach ($products_rating as $product_rating) @if($product_rating->products_id == $item->FK_products_id) @include('includes.rating-star',['value'=>$product_rating->ratings_value]) @break @endif @endforeach @endif
{{ __('lang.orderNo') }}:
{{ $order->orders_no }}
{{ __('lang.orderStatus') }} :
{{__('lang.orders_status_'.$order->orders_status) }}
@if(isset($shipping_status) && $shipping_status)
{{ __('lang.ShippingStatus') }} :
{{$shipping_status }}
@endif
{{ __('lang.price') }}
@include('components.currency',['price'=> $item->orders_items_price ]) @if($item->orders_items_price_before_sale && $item->orders_items_price_before_sale > 0)
@include('components.currency',['price'=> $item->orders_items_price_before_sale ? $item->orders_items_price_before_sale : '' ]) @endif
@if($account->accounts_show_points)
{{ __('lang.points') }}
{{ $item->orders_items_points}}
@endif
{{ __('lang.quantity') }}
@if($item->product->products_type == 'weight' && $item->product->products_lowest_weight_available && $account->accounts_show_product_type)
{{$item->orders_items_count }} {{__('lang.kg')}}
@else
{{ (int)$item->orders_items_count }}
@endif
{{ __('lang.totalPrice') }}
@include('components.currency',['price'=> $item->orders_items_total ])
{{-- orders_items_price_before_sale --}}

@endforeach
@if($order->is_delivery == '1' && $order->orders_delivery_address )
{{ __('lang.deliveryAddress') }}
{{ $order->orders_delivery_address }}
{{ $order->orders_phone }}
{{ __('lang.deliveryMethod') }}
@if($order->shipping_method) {{ $order->shipping_method->shipping_methods_title }}
{{ $order->shipping_method->shipping_methods_text }} @if($order->shipping_method->shipping_methods_text)
@endif @endif @if($order->orders_delivery_cost > 0) @if(isset($order->free_delivery_coupons_code) && $order->free_delivery_coupons_code != '') @include('components.currency',['price'=> $order->orders_delivery_cost ]) {{ __('lang.free') }} @else @include('components.currency',['price'=> $order->orders_delivery_cost ]) @endif @else {{ __('lang.free') }} @endif @if($order->delivery_time) {{ __('lang.delivery_time') }} {{ $order->delivery_time->delivery_times_text }} @elseif($order->orders_scheduling) {{ __('lang.scheduled_pickup_message_part1') }} {{ date('Y-m-d h:i', strtotime($order->orders_scheduling)) }} {{ date('A', strtotime($order->orders_scheduling)) == 'AM' ? __('lang.am') : __('lang.pm') }} @endif
@elseif($order->is_delivery == '0' && $order->branch)
{{ __('lang.pickupFromBranch') }} ( {{ $order->branch->branches_title }})
{{ $order->branch->branches_address }}
{{ $order->branch->branches_text }}
{{ $order->branch->branches_whatsapp }}
{{ $order->branch->branches_mobile }} @if($order->orders_scheduling) {{ __('lang.scheduled_pickup_message_part1') }} {{ date('Y-m-d', strtotime($order->orders_scheduling)) }} @endif
@endif
{{ __('lang.paymentType') }}
@if( env('apiUrl') == '/api/v004') {{ isset($order->payment) && $order->payment ? $order->payment->payments_name : ''}} @else @foreach($order->orders_payments as $key => $order_payment) @if(($order_payment->orders_payments_status == 'success' || ($order_payment->orders_payments_status == 'pending' && in_array($order_payment->orders_payments_slug,['cash','bank_transfer']) )) && !in_array($order_payment->orders_payments_slug,$exclodePayments)) {{ $order_payment->payment ? $order_payment->payment->payments_name : $order_payment->orders_payments_slug }} {{ __('lang.youPaied') }} @include('components.currency',['price'=> $order_payment->orders_payments_amount ])
@endif @endforeach @foreach($order->bank_transfer_payments as $key => $bank_transfer_payment) @if($bank_transfer_payment->orders_payments_status == 'failed') @if($hasPayments)
@endif {{ $bank_transfer_payment->payment ? $bank_transfer_payment->payment->payments_name : $bank_transfer_payment->orders_payments_slug }} {{ __('lang.payment_status') }}: {{ __('lang.payment_'.$bank_transfer_payment->orders_payments_status )}} @if($bank_transfer_payment->orders_payments_desc) {{ __('lang.failed_reason') }}: {{ $bank_transfer_payment->orders_payments_desc }} @endif
@endif @endforeach @endif @if($account->accounts_show_points)
{{ __('lang.totalEarnedPoints') }}
{{ $order->orders_total_order_products_points ?? 0 }} @endif @if($order->cashback && $order->cashback->client_wallet_operations_value )
{{ __('lang.cashback') }}
@include('components.currency',['price'=> $order->cashback->client_wallet_operations_value ]) @endif
{{ __('lang.subTotal') }} : @include('components.currency',['price'=> $order->orders_price ])
@if($order->is_delivery == '1' ) {{ __('lang.delivery') }} : @include('components.currency',['price'=> $order->orders_delivery_cost ? $order->orders_delivery_cost : 0 ])
@endif @if($order->coupons_code) {{ __('lang.coupons_code') }} : {{ $order->coupons_code }}
{{ __('lang.coupons_value') }} : {{ number_format($order->coupons_value, 2) }} @if($order->coupons_type == 'rate') % @else @include('components.currency',['price'=> '']) @endif
@endif @if($order->orders_discount_value) {{ __('lang.discount') }} : @if(isset($order->coupons_type) && $order->coupons_type == 'rate') ({{ (float)$order->coupons_value }}%) @endif @include('components.currency',['price'=> $order->orders_discount_value ? $order->orders_discount_value : 0 ])
@endif
{{ __('lang.total') }} : @include('components.currency',['price'=> $order->orders_final_cost ])
@if($account->accounts_show_order_return_requests == '1')