Order List / Order History Page
URL: /user/reviewmyorders
Template: Modules/Application/resources/views/user/reviewmyorders.blade.php
Shows a customer's order history. Requires authentication.
Page Variables
$orders — The Orders Array
An array of order objects. Each represents one placed order.
| Property | Type | Description |
|---|---|---|
orderId |
int | Unique order ID |
orderDate |
string | Order date (formatted) |
orderStatus |
string | Status code ('U' = unpaid, 'P' = paid, 'S' = shipped, etc.) |
orderStatusLabel |
string | Human-readable status label |
grandTotal |
float | Order total |
trackingCode |
string | Shipment tracking number |
shippingMethod |
string | Carrier code (e.g., 'UPS', 'FedEx') |
invoiceUrl |
string | URL to view the order invoice |
items |
array | Array of ordered items |
Order Status Codes
| Code | Meaning |
|---|---|
'U' |
Unpaid / Pending |
'P' |
Paid |
'S' |
Shipped |
'R' |
Return requested |
'C' |
Cancelled |
'D' |
Delivered |
Order Item Structure
Each $order->items element:
| Key | Type | Description |
|---|---|---|
name |
string | Product name |
itemNo |
string | SKU |
quantity |
int | Quantity ordered |
price |
float | Unit price |
shippingAmount |
float | Shipping cost for this item |
image |
string | Product image URL |
Template Example
@extends('layout.layout')
@section('headtitle')
<title>My Orders | {{ $page->settings->siteTitle }}</title>
@endsection
@section('content')
<div class="container mt-4">
<h1>My Order History</h1>
@if(empty($orders))
<div class="alert alert-info">You haven't placed any orders yet.</div>
@else
@foreach($orders as $order)
<div class="card mb-3">
<div class="card-header d-flex justify-content-between">
<span>Order #{{ $order->orderId }} — {{ $order->orderDate }}</span>
<span class="badge bg-info">{{ $order->orderStatusLabel }}</span>
</div>
<div class="card-body">
{{-- Items --}}
@foreach($order->items as $item)
<div class="d-flex align-items-center mb-2">
<img src="{{ $item['image'] ?? noproductimage() }}" width="60" class="me-3" alt="{{ $item['name'] }}">
<div>
<strong>{{ $item['name'] }}</strong> ({{ $item['itemNo'] }})<br>
Qty: {{ $item['quantity'] }} × ${{ tagPrice($item['price']) }}
</div>
</div>
@endforeach
{{-- Tracking --}}
@if($order->trackingCode)
<div class="mt-2">
<strong>Tracking:</strong>
<a href="{{ trackingUrl($order->shippingMethod, $order->trackingCode) }}" target="_blank">
{{ $order->trackingCode }} ({{ $order->shippingMethod }})
</a>
</div>
@endif
<div class="mt-2 text-end">
<strong>Total: ${{ tagPrice($order->grandTotal) }}</strong>
</div>
</div>
<div class="card-footer">
<a href="{{ $order->invoiceUrl }}" class="btn btn-sm btn-outline-secondary">View Invoice</a>
</div>
</div>
@endforeach
@endif
</div>
@endsection