{{ __('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($os->variant->products->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 @foreach($firstarray as $o) @php $orivar = App\AddSubVariant::withTrashed()->withTrashed()->findorfail($o->variant_id); $varcount = count($orivar->main_attr_value); $i=0; $var_name_count = count($orivar['main_attr_id']); unset($name); $name = array(); $var_name; $newarr = array(); for($i = 0; $i<$var_name_count; $i++){ $var_id =$orivar['main_attr_id'][$i]; $var_name[$i] = $orivar['main_attr_value'][$var_id]; $name[$i] = App\ProductAttributes::where('id',$var_id)->first(); } try{ $url = url('details').'/'.$orivar->products->id.'?'.$name[0]['attr_name'].'='.$var_name[0].'&'.$name[1]['attr_name'].'='.$var_name[1]; }catch(Exception $e) { $url = url('details').'/'.$orivar->products->id.'?'.$name[0]['attr_name'].'='.$var_name[0]; } @endphp
product name
{{substr($orivar->products->name, 0, 30)}}{{strlen($orivar->products->name)>30 ? '...' : ""}} (@foreach($orivar->main_attr_value as $key=> $orivars) @php $getattrname = App\ProductAttributes::where('id',$key)->first()->attr_name; $getvarvalue = App\ProductValues::where('id',$orivars)->first(); @endphp @if($i < $varcount) @if(strcasecmp($getvarvalue->unit_value, $getvarvalue->values) != 0 && $getvarvalue->unit_value != null) @if($getvarvalue->proattr->attr_name == "Color" || $getvarvalue->proattr->attr_name == "Colour" || $getvarvalue->proattr->attr_name == "color" || $getvarvalue->proattr->attr_name == "colour") {{ $getvarvalue->values }}, @else {{ $getvarvalue->values }}{{ $getvarvalue->unit_value }}, @endif @else {{ $getvarvalue->values }}, @endif @else @if(strcasecmp($getvarvalue->unit_value, $getvarvalue->values) != 0 && $getvarvalue->unit_value != null) @if($getvarvalue->proattr->attr_name == "Color" || $getvarvalue->proattr->attr_name == "Colour" || $getvarvalue->proattr->attr_name == "color" || $getvarvalue->proattr->attr_name == "colour") {{ $getvarvalue->values }} @else {{ $getvarvalue->values }}{{ $getvarvalue->unit_value }} @endif @else {{ $getvarvalue->values }} @endif @endif @endforeach )
{{ __('staticwords.SoldBy') }}: {{$orivar->products->store->name}}
{{ __('Qty') }}: {{$o->qty}}
@if($o->status == 'delivered') {{ ucfirst($o->status) }} @elseif($o->status == 'processed') {{ ucfirst($o->status) }} @elseif($o->status == 'shipped') {{ ucfirst($o->status) }} @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') @if($o->discount != 0) {{ round(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->order->discount,2) }} {{ $order->coupon }} {{ __('applied') }} @else {{ round($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'category') @if($o->discount != 0) {{ round(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }}
{{ $order->coupon }} {{ __('applied') }} @else {{ round($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'cart') {{ round(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} {{ __('applied') }} @endif @else {{ round($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif

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

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

no-order.jpg
@endif