Difference between revisions of "Liquid Template Variables - order"
From Spiffy Stores Knowledge Base
Line 176: | Line 176: | ||
Returns a the shipping method used for the order. | Returns a the shipping method used for the order. | ||
− | |||
− | |||
− | |||
− | |||
== <code>billing_address</code> == | == <code>billing_address</code> == |
Revision as of 13:24, 12 February 2016
The Liquid template variable order has the following attributes:
Contents
- 1 order.id
- 2 order.customer
- 3 order.email
- 4 order.currency
- 5 order.credit
- 6 order.cancelled
- 7 order.cancelled_at
- 8 order.cancel_reason
- 9 order.cancel_reason_label
- 10 order.created_at
- 11 order.customer_url
- 12 order.discounts
- 13 order.discount_price
- 14 order.financial_status
- 15 order.financial_status_label
- 16 order.fulfilment_status
- 17 order.fulfilment_status_label
- 18 order.line_items
- 19 order.name
- 20 order.order_number
- 21 order.shipping_address
- 22 order.billing_address
- 23 order.shipping_methods
- 24 order.shipping_price
- 25 order.subtotal_price
- 26 order.taxes_included
- 27 order.tax_lines
- 28 order.tax_price
- 29 order.included_tax_price
- 30 order.total_price
- 31 order.surcharge_price
- 32 order.surcharge_rate
- 33 order.surcharge_description
- 34 order.transactions
- 35 order.unique_gateway
- 36 order_name
- 37 order_number
- 38 order_date
- 39 order_time
- 40 shop_name
- 41 included_tax_price
- 42 shipping_price
- 43 subtotal_price
- 44 discounts_savings
- 45 discount_price
- 46 discount_code
- 47 gateway
- 48 shipping_method
- 49 billing_address
- 50 order_quantity
- 51 line_items
- 52 fulfilled_line_items
- 53 unfulfilled_line_items
- 54 note
- 55 attributes (Not Currently Implemented)
- 56 cancelled
- 57 cancelled_at
- 58 cancel_reason
- 59 financial_status
- 60 financial_status_label
- 61 fulfillment_status
- 62 fulfillment_status_label
- 63 order.metafields
order.id
Returns the unique internal number of the order.
This is normally only for internal usage.
order.customer
Return the customer who placed this order.
order.email
order.currency
order.credit
order.cancelled
Returns true if the order has been cancelled.
order.cancelled_at
Returns a timestamp of when the order was cancelled.
order.cancel_reason
Returns one of the following cancellation reasons, if the order was cancelled.
- Customer changed/cancelled order
- Items unavailable
- Fraudulent order
- Other
order.cancel_reason_label
order.created_at
order.customer_url
order.discounts
order.discount_price
order.financial_status
order.financial_status_label
order.fulfilment_status
order.fulfilment_status_label
order.line_items
order.name
order.order_number
order.shipping_address
Returns the shipping address of the order.
order.billing_address
Returns the billing address of the order.
order.shipping_methods
order.shipping_price
order.subtotal_price
order.taxes_included
order.tax_lines
Returns an array of tax_line objects for the order.
{% for tax_line in order.tax_lines %} Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%): {{ tax_line.price | money }} {% endfor %} => Tax (GST 10.0%): $25
order.tax_price
Returns the total amount of tax for the order.
order.included_tax_price
order.total_price
Returns the total of the order, which is the subtotal plus tax and shipping, if applicable.
If the order total includes taxes which are not applicable for export orders, then these taxes are not included in the total price for the order.
order.surcharge_price
order.surcharge_rate
order.surcharge_description
order.transactions
order.unique_gateway
order_name
The is the name of the order.
By default, the name is formatted as a hash (#) followed by the order number. For example,
#01234
order_number
This is the number of the order.
1234
order_date
This is the date of the order.
12th September, 2008
order_time
This is the time of the order.
14:39
shop_name
Returns the name of your shop.
included_tax_price
Returns the amount of taxes included in the order subtotal price. Included taxes occur when the amount of tax is included as part of an item's price as opposed to taxes which are added to the item's price.
shipping_price
Returns the amount of shipping included in the order.
subtotal_price
Returns the total amount of the order less discounts.
This amount will not include any additional taxes or shipping costs.
discounts_savings
Returns the amount of any discounts that have been applied to the order (as a negative amount).
discount_price
Returns the amount of any discounts that have been applied to the order.
discount_code
Returns the discount code that was used, if any.
gateway
Returns the name of the payment gateway that was used.
shipping_method
Returns a the shipping method used for the order.
billing_address
Returns a billing address object.
order_quantity
Returns the total number of items in the order.
line_items
Returns an array of Line_Item objects.
fulfilled_line_items
Returns an array of fulfilled Line_Item objects.
unfulfilled_line_items
Returns an array of Line_Item objects that have not been fulfilled.
note
Returns the note that was attached to the order.
attributes
(Not Currently Implemented)
Returns any attributes which where attached to the order.
Example usage:
{{ attributes.gift-note }}
cancelled
Returns true if the order has been cancelled.
cancelled_at
Returns the date and time that the order was cancelled.
{{ order.cancelled_at | date: "%B %d, %Y %I:%M%p" }}
cancel_reason
The reason the order was cancelled.
financial_status
Returns the financial status of an order. The possible values are:
- pending
- authorized
- paid
- partially_paid
- refunded
- partially_refunded
- voided
financial_status_label
Returns the display text for the financial status of an order. The possible values are:
- Pending
- Paid
- Partially Paid
- Cancelled
fulfillment_status
Returns the display text for the financial status of an order. The possible values are:
- unshipped
- partial
- shipped
fulfillment_status_label
Returns the display text for the fulfillment status of an order. The possible values are:
- Unshipped
- Partial
- Shipped
order.metafields
Return the metafields for the order.
Metafields can only be managed using the Spiffy Stores API.