@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

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

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

@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
@if($order->payment_status == 'paid') @if($order->offer && $order->order_type != 'quiz') @php $delivery_date = Carbon\Carbon::parse($order->order_date)->addDays($order->offer->shipping_time ? $order->offer->shipping_time : 0)->format('Y-m-d'. ' 00:00:00'); @endphp
00

Days

00

HOURS

00

MINUTES

00

SECONDS

@else Not Offer Product @endif @else Payment {{$order->payment_status}} @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