{{ __('staticwords.MyOrders') }} ({{ count($orders) }})

@if(count($orders)>0) @foreach($orders as $order) @php if($order->discount != 0){ if($order->distype == 'category'){ $findCoupon = App\Coupan::where('code','=',$order->coupon)->first(); $catarray = collect(); foreach ($order->invoices as $key => $os) { if(isset($os->variant->products) && $os->variant->products->category_id == $findCoupon->cat_id){ $catarray->push($os); } if(isset($os->simple_product) && $os->simple_product->category_id == $findCoupon->cat_id){ $catarray->push($os); } } } } @endphp
{{ $ord_postfix }}{{ $order->order_id }} {{ __('Transcation ID') }}: {{ $order->transaction_id }}
{{ __('Payment Method') }}: {{ $order->payment_method }}
@php $x = count($order->invoices); if(isset($order->invoices[0])){ $firstarray = array($order->invoices[0]); } $morearray = array(); $counter = 0; foreach ($order->invoices as $value) { if($counter++ >0 ){ array_push($morearray, $value); } } $morecount = count($morearray); @endphp @if(isset($firstarray)) @foreach($firstarray as $o)
@if($o->variant) @if(isset($o->variant->variantimages) && file_exists(public_path().'/variantimages/thumbnails/'.$o->variant->variantimages->main_image)) product name @else product name @endif @endif @if($o->simple_product) @if($o->simple_product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$o->simple_product->thumbnail)) @else product name @endif @endif
@if(isset($o->variant)) {{substr($o->variant->products->name, 0, 30)}}{{strlen($o->variant->products->name)>30 ? '...' : ""}} {{ variantname($o->variant) }}
{{ __('staticwords.SoldBy') }}: {{$o->variant->products->store->name}} @endif @if(isset($o->simple_product)) {{ $o->simple_product->product_name }}
{{ __('staticwords.SoldBy') }}: {{$o->simple_product->store->name}} @endif
{{ __('Qty') }}: {{$o->qty}}
@if($o->status == 'delivered') {{ ucfirst($o->status) }}

{{__("Cashback earned")}} {{$o->cashback}}

@elseif($o->status == 'processed') {{ ucfirst($o->status) }} @elseif($o->status == 'shipped') {{ ucfirst($o->status) }} @if($o->courier_channel != '' && $o->tracking_link != '' && $o->exp_delivery_date != '')

{{ __('Expected delivery by :date',['date' => date("d-M-Y",strtotime($o->exp_delivery_date))]) }}.

@endif @elseif($o->status == 'return_request') {{ __('Return Request') }} @elseif($o->status == 'returned') {{ __('Returned') }} @elseif($o->status == 'refunded') {{ __('Refunded') }} @elseif($o->status == 'cancel_request') {{ __('Cancelation Request') }} @elseif($o->status == 'canceled') {{ __('Canceled') }} @elseif($o->status == 'Refund Pending') {{ __('Refund in progress') }} @elseif($o->status == 'ret_ref') {{ __('Returned & Refunded') }} @else {{ ucfirst($o->status) }} @endif
@if($o->order->discount !=0) @if($o->order->distype == 'product') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->order->discount,2) }} {{ $order->coupon }} {{ __('applied') }} @elseif($o->order->distype == 'simple_product') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} applied @elseif($o->order->distype == 'category') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }}
{{ $order->coupon }} {{ __('applied') }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'cart') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} {{ __('applied') }} @endif @else {{ price_format(($o->qty*$o->price)+$o->tax_amount+$o->shipping,2) }} @endif

({{ __('Incl. of Tax & Shipping') }})
@endforeach @endif @if($order->invoices()->count()>1) @endif
@endforeach
{{ $orders->links() }}
@else

{{ __('staticwords.ShoppingText') }}

no-order.jpg
@endif