Orders Tag

{exp:store:orders}
    <!-- order details -->
{/exp:store:orders}

The Orders tag prints any information about a single order, or multiple orders. The template variables are mostly the same as in the Checkout Tag, with a few extra variables available.

Orders Tag Parameters

order_id

Specifies the order ID to retrieve. If you are allowing users to access their order details via a URL segment, you should use this parameter in conjunction with member_id="CURRENT_USER". This will prevent users browsing private order data by guessing order IDs. Otherwise, allow access to your orders using the order hash.

This parameter also accepts a pipe-separated list of order IDs, similar to the channel entries tag (e.g. order_id="3|4|5" or order_id="not 99").

order_hash

Retrieve an order by order hash. Every order has a unique order hash associated with it - this is the preferred method of allowing users to view their order details online, as it prevents people from viewing sensitive order data simply by guessing a valid order ID. Generally you would pull this from a segment variable.

member_id

Limit the orders to a specific member. If the constant CURRENT_USER is entered, only orders from the currently logged in member will display (and if the user is not logged in, no orders will be returned).

You can use this parameter to prevent users from viewing each other’s order details, or to template a “My Orders” page.

order_status

Limit the orders displayed to only orders with a certain status. You can search for multiple statuses by using the pipe separator (e.g. order_status="new|shipped"), or all orders without a certain status using not (e.g. order_status="not shipped").

Display only paid or unpaid orders. Defaults to display all orders.

orderby

Order the results. Valid values include order_date, order_id, order_total, order_status, username and screen_name. Defaults to order_date.

sort

The sort order of the results. Must be either “asc” or “desc”. Defaults to “desc”.

limit

Limit the maximum number of orders displayed. The default is 100 orders.

Order Tag Variables

Most variables available in the Checkout Tag are available here. In addition, you can use the following variables:

screen_name

The screen_name for the member connected to an order.

username

The username for the member connected to an order.

order_id

The unique id assigned to an order.

shipping_method

The title of the order’s instance of {shipping_method_plugin}.

shipping_method_id

The ID of the order’s instance of {shipping_method_plugin}.

shipping_method_plugin

The name of the order’s shipping plugin.

payment_method

The name of the order’s payment plugin.

order_date

The date the order was placed according to the server, as a unix timestamp.

ip_address

The ip address from which the order was originally placed.

order_status

The current status of the order. Order Statuses are defined in the Control Panel.

order_status_updated

The date the order had the current {order_status} applied to it according to the server, as a unix timestamp.

order_status_member

The member id of the user who applied the current {order_status} to the order.

Automated Order Status changes are made by member id 0 (System).

order_paid

The current total amount paid on the order.

if is_order_paid

True if the order has been fully paid.

if is_order_unpaid

True if the order has not yet been fully paid.

order_paid_date

The date the order was completely paid off, as a unix timestamp.

order_owing

Equivalent to {order_total} - {order_paid}.