@extends("frontend.layout.master") @section('title','Emart | All My Order') @section("content")

{{__('My Orders')}} ({{ count($orders) }})

@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
{{ __('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) }}

{{__('Sold By')}}: {{$o->variant->products->store->name}}

@endif @if(isset($o->simple_product))
{{ $o->simple_product->product_name }}

{{__('Sold By')}}: {{$o->simple_product->store->name}}

@endif {{ __('Qty') }}: {{$o->qty}}
@endforeach @endif
Status: {{ ucfirst($o->status) }}

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

@endforeach
@endsection