@extends('vendor.layouts.app') @section('title', 'Order Management') @section('page-title', 'Order List') @push('styles') @endpush @section('content')
Manage orders and view product details.
Total Orders
Total Revenue
Pending Orders
Delivered
| Order ID | Products | Customer | Date | Amount | Status | Actions |
|---|---|---|---|---|---|---|
| #{{ $order->invoice_id ?? $order->id }} |
@php
$maxDisplay = 3;
$count = $order->orderdetails->count();
@endphp
@foreach($order->orderdetails->take($maxDisplay) as $detail)
@if($detail->product && $detail->product->image)
+{{ $count - $maxDisplay }}
@endif
|
{{ strtoupper(substr($order->customer->name ?? 'G', 0, 1)) }}
{{ $order->customer->name ?? 'Guest User' }}{{ $order->customer->phone ?? 'No Phone' }} |
{{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('h:i A') }}
|
৳{{ number_format($order->amount, 0) }}
{{ $order->payment->payment_method ?? 'COD' }}
|
@php $status = (string)($order->order_status ?? ''); $badgeClass = 'badge-soft-secondary'; $statusName = 'Unknown'; if ($status == '1' || $status == 1) { $badgeClass = 'badge-soft-warning'; $statusName = 'Pending'; } elseif ($status == '2' || $status == 2) { $badgeClass = 'badge-soft-info'; $statusName = 'Processing'; } elseif ($status == '3' || $status == 3) { $badgeClass = 'badge-soft-info'; $statusName = 'Shipping'; } elseif ($status == '6' || $status == 6) { $badgeClass = 'badge-soft-success'; $statusName = 'Delivered'; } elseif ($status == '8' || $status == 8 || $status == '11' || $status == 11) { $badgeClass = 'badge-soft-danger'; $statusName = 'Cancelled'; } @endphp {{ $order->status->name ?? $statusName }} |
|
No orders foundTry adjusting your filters or create a new order. |
||||||