Skip to main content

Order

Order loop displays orders information.
{loop type="order" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
customerA single customer id or current keyword to get logged in user or * keyword to match all users.currentcustomer="2", customer="current"
exclude_statusA single or a list of order status ID which are to be excluded from the resultsstatus="*", exclude_status="1,4,7"
exclude_status_codeA single or a list of order status codes which are to be excluded from the results. The valid status codes are not_paid, paid, processing, sent, canceled, or any custom status that may be definedexclude_status_code="paid,processing"
idA single or a list of order ids.id="2", id="1,4,7"
orderA list of values see sorting possible valuescreate-date-reverseorder="create-date-reverse"
statusA single or a list of order status ID or * keyword to match allstatus="*", status="1,4,7"
status_codeA single or a list of order status codes or * keyword to match all. The valid status codes are not_paid, paid, processing, sent, canceled, or any custom status that may be definedstatus="*", status="not_paid,canceled"
with_prev_next_infoA boolean. If set to true, $PREVIOUS and $NEXT output arguments are available.falsewith_prev_next_info="yes"

Plus the global arguments and search arguments

Outputs

VariableValueIf with_prev_next_info='true'If with_prev_next_info='false'
$CURRENCYthe order currency id ; you can use it in a currency loop
$CURRENCY_RATEthe order currency rate
$CUSTOMERthe order customer id ; you can use it in a customer loop
$DELIVERY_ADDRESSthe order delivery address id ; you can use it in a order address loop
$DELIVERY_MODULEthe order delivery module id ; you can use it in a module loop
$DELIVERY_REFthe order delivery reference. It's usually use for tracking package
$DISCOUNTthe order discount
$HAS_NEXTtrue if a order exists after this one, following orders id.🚫
$HAS_PAID_STATUSTrue is the order has the 'paid' status, false otherwise
$HAS_PREVIOUStrue if a order exists before this one following orders id.🚫
$IDthe order id
$INVOICE_ADDRESSthe order the order invoice address id ; you can use it in a order address loop
$INVOICE_REFthe order invoice reference
$IS_CANCELEDTrue is the order has the 'canceled' status, false otherwise
$IS_NOT_PAIDTrue is the order has the 'not paid' status, false otherwise
$IS_PAIDTrue is the order has been paid (whatever current status is), false otherwise
$IS_PROCESSINGTrue is the order has the 'processing' status, false otherwise
$IS_SENTTrue is the order has the 'sent' status, false otherwise
$LANGthe order language id
$NEXTThe ID of order after this one, following orders id, or null if none exists.🚫
$PAYMENT_MODULEthe order payment module id ; you can use it in a module loop
$POSTAGEthe order postage
$POSTAGE_TAXthe order postage tax
$POSTAGE_TAX_RULE_TITLEthe tax rule used to get the postage tax amount
$POSTAGE_UNTAXEDthe order postage amount without tax
$PREVIOUSThe ID of order before this one, following orders id, or null if none exists.🚫
$REFthe order reference
$STATUSthe order status ; you can use it in a order status loop
$STATUS_CODEthe order status code
$TOTAL_AMOUNTthe order amount without taxes
$TOTAL_ITEMS_AMOUNTthe total amount for ordered items, excluding taxes
$TOTAL_ITEMS_TAXthe total tax amount for of the ordered items only, without postage tax
$TOTAL_TAXthe order taxes amount
$TOTAL_TAXED_AMOUNTthe order amount including taxes
$TOTAL_TAXED_ITEMS_AMOUNTthe total amount for ordered items, including taxes
$TRANSACTION_REFthe order transaction reference. It's usually the unique identifier shared between the e-shop and it's bank
$VIRTUALthe order has at least one product which is a virtual product
$WEIGHTThe total weight of the order

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
companycompany-reversecompany
create-datecreate-date-reversecreation date
customer-namecustomer-name-reversecustomer name
idid-reverseid
invoice-dateinvoice-date-reverseinvoice date
referencereference-reversereference
statusstatus-reversestatus