@extends('layouts.frontend') @section('title', 'Order History') @section('css') @endsection @section('content')
@include('users.inc.sidebar')
@if(Session::has('success'))
Success! {{Session::get('success')}}
@endif @if(Session::has('error'))
Error! {{Session::get('error')}}
@endif

Total Order ({{$all}})

Pending Orders
Accept Order
Ready To Ship
On Delivery
Cancel Order
Complete Order

@foreach($orders as $index => $order) @if($order->payment_method != 'pending' || $order->offer_id == null) order_status == 'cancel') style="background:#ff000026" @endif> @endif @endforeach
# Order Expected Delivery Date Product Qty Amount Pay_Method Payment Status Invoice Action
{{ $index+1 }} #{{$order->order_id}}

{{Carbon\Carbon::parse($order->order_date)->format(Config::get('siteSetting.date_format'))}}

@php $delivery_date = Carbon\Carbon::parse($order->order_details[0]->product->availability_date ? $order->order_details[0]->product->availability_date : 0)->format('Y-m-d'. ' 00:00:00'); @endphp
00

Days

00

HOURS

00

MINUTES

00

SECONDS

@if(count($order->order_details)>0 && $order->order_details[0]->product) {{Str::limit($order->order_details[0]->product->title, 50)}} @else product not found @endif {{$order->total_qty}} {{$order->currency_sign . ($order->total_price + $order->shipping_cost - $order->coupon_discount) }} @if($order->payment_method !='pending') {{ ucfirst(str_replace('-', ' ', $order->payment_method))}} @else Pending
Pay Now @endif
{{$order->payment_status}} @php $updateStatus = $order->orderNotify->where('type', '=', 'orderStatus'); @endphp @if($order->order_status == 'delivered') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'accepted') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'ready-to-ship') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'cancel') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'on-delivery') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'return') {{ str_replace('-', ' ', $order->order_status)}} @else Pending @endif @if($order->order_status != 'pending') @if(count($order->orderNotify)>0) @foreach($updateStatus as $index => $statusNotify) @if($statusNotify->notify)

{{$index+1 .'. '. ucwords($statusNotify->notify)}}
{{\Carbon\Carbon::parse($statusNotify->created_at)->format(Config::get('siteSetting.date_format') .' | '.' h:i A')}}

@endif @endforeach
@endif @endif
Invoice
@endsection @section('js') @endsection