@if ($orders->count() > 0)
@foreach ($orders as $order) @php // Payment Status Badge $paymentStatusValue = $order->payment->status; $paymentStatusClass = 'badge '; $paymentStatusText = ''; if ($paymentStatusValue == 'completed') { $paymentStatusClass .= 'bg-success'; $paymentStatusText = __('Completed'); } elseif ($paymentStatusValue == 'pending') { $paymentStatusClass .= 'bg-warning'; $paymentStatusText = __('Pending'); } elseif ($paymentStatusValue == 'failed') { $paymentStatusClass .= 'bg-danger'; $paymentStatusText = __('Failed'); } elseif ($paymentStatusValue == 'canceled') { $paymentStatusClass .= 'bg-danger'; $paymentStatusText = __('Canceled'); } elseif ($paymentStatusValue == 'refunded') { $paymentStatusClass .= 'bg-info'; $paymentStatusText = __('Refunded'); } else { $paymentStatusClass .= 'bg-warning'; $paymentStatusText = ucfirst($paymentStatusValue); } @endphp {{-- --}} @endforeach
{{ __('Order Number') }} {{ __('Order Date') }} {{ __('Order Status') }} {{ __('Payment Status') }} {{ __('Amount') }} {{ __('Payment Method') }} {{ __('Items') }} {{ __('View') }} {{ __('Invoice') }}
{{ $order->code }} {{ $order->created_at->format('d M Y') }} {!! BaseHelper::clean($order->status->toHtml()) !!} {{ $paymentStatusText }} {{ format_price($order->sub_total, null, false, true) }} @if (is_plugin_active('payment') && $order->payment && $order->payment->id && $order->payment->payment_channel && $order->payment->payment_channel->label()) {{ $order->payment->payment_channel->label() }} @else {{ __('Not specified') }} @endif {{ $order->products_count }} {{ __('item(s)') }} {{ __('view') }} @if ($order->isInvoiceAvailable()) {{ __('Download') }} @else - @endif {{-- {{ __('Download') }} --}}
@if ($orders instanceof \Illuminate\Pagination\LengthAwarePaginator && $orders->hasPages())

{{ __('Showing') }} {{ $orders->firstItem() }} {{ __('to') }} {{ $orders->lastItem() }} {{ __('of') }} {{ $orders->total() }} {{ __('entries') }}

{!! $orders->appends(request()->except('page'))->links() !!}
@endif
@else

{{ __('No orders found.') }}

{{ __('Start Shopping') }}
@endif