CoolCMS API

OrderDetailTrait

Order detail: a read-only overview with links to the Invoicer invoice (`Invoice.orderId`, no FK) and to Store reservations and issue documents (`SourceRef(module=4, type='order', id=$orderId)`).

The status form (OrderStatusChangeFormTrait) is part of the same page.

The action is named status (not detail) because the page :Admin:Eshop:Order:status is already registered in the database. A credit note goes through the regular status transition with the Invoicer creditNote document type (OrderInvoiceGenerator); there is no separate creditnote action.

Table of Contents

Methods

actionStatus()  : void
pickupCarrierLabel()  : string|null
Returns a readable carrier name from the `OrderShipper::$pickupCarrier` snapshot (`script_name`).
renderStatus()  : void
orderInvoices()  : array<int, Invoice>
orderStockDocuments()  : array<int, object>
orderStockReservations()  : array<int, object>

Methods

actionStatus()

public actionStatus(int $id) : void
Parameters
$id : int

pickupCarrierLabel()

Returns a readable carrier name from the `OrderShipper::$pickupCarrier` snapshot (`script_name`).

public pickupCarrierLabel(string|null $scriptName) : string|null

The snapshot is used instead of the live Shipper relation, which may change or be deleted after the order. An unknown or old script_name (driver since removed) falls back to the raw value so the admin still sees something. manual is not the script_name of any driver: it marks a pickup point typed in by hand for a carrier without a driver, so it is translated instead of looked up in the registry (otherwise the raw "manual" would show in the detail).

Parameters
$scriptName : string|null
Return values
string|null

orderStockDocuments()

protected orderStockDocuments(Order $order) : array<int, object>
Parameters
$order : Order
Return values
array<int, object> —

Store issue and receipt documents (StockDocument) of the order.

orderStockReservations()

protected orderStockReservations(Order $order) : array<int, object>
Parameters
$order : Order
Return values
array<int, object> —

Store reservations (StockReservation) of the order.

On this page

Search results