order - aareano/ifshop-wiki GitHub Wiki
This drop corresponds to Shopify's.
order.discounts_amount
order.discounts_savings
order.fulfillment_event
order.fulfillment
order.fulfillments
order.id
order.item_count
order.order_status_url
order.refund
order.refunds
order.requires_shipping
order.shipping_method
order.shop
order.source_name
order.transaction
none
missing Shopify email properties
The following properties are available in Shopify's email templates, but are not (yet) available in ifshop's email templates.
order.order_name
order.total_tax
order.attributes
order.referring_site
order.landing_site
order.landing_site_ref
order.has_high_risks
order.unique_gateways
- order.attributes
- order.billing_address
- order.cancel_reason
- order.cancel_reason_label
- order.cancelled
- order.cancelled_at
- order.created_at
- order.customer
- order.customer_url
- order.discounts
- order.discounts_amount
- order.discounts_savings
- order.email
- order.financial_status
- order.financial_status_label
- order.fulfillment
- order.fulfillment_event
- order.fulfillment_status
- order.fulfillment_status_label
- order.fulfillments
- order.id
- order.item_count
- order.line_items
- order.location
- order.name
- order.note
- order.order_number
- order.order_status_url
- order.refund
- order.refunds
- order.requires_shipping
- order.shipping_address
- order.shipping_method
- order.shipping_methods
- order.shipping_price
- order.shop
- order.source_name
- order.subtotal_price
- order.tags
- order.tax_lines
- order.tax_price
- order.total_price
- order.transaction
- order.transactions
Returns the custom cart attributes for the order, or an empty list if there aren't any.
When you're looping through attributes, use any of the following access patterns to get the name of the attribute:
{{ attribute.name }}
{{ attribute | first }}
Use any of the following access patterns to get the value of the attribute:
{{ attribute.value }}
{{ attribute | last }}
{{ attribute.Name-Of-Attribute }}
{{ attribute["Name-Of-Attribute"] }}
Input
{% if order.attributes %}
<p>Order notes:</p>
<ul>
{% for attribute in order.attributes %}
<li><strong>{{ attribute | first }}</strong>: {{ attribute | last }}</li>
{% endfor %}
</ul>
{% endif %}
Output
<p>Order notes:</p>
<ul>
<li><strong>Message</strong>: I love your products! Thanks!</li>
</ul>
Returns the billing address of the order.
Returns true if an order is canceled, or false if it is not.
Returns the timestamp of when an order was canceled. Use the date filter to format the timestamp.
Returns one of the following cancellation reasons, if an order was canceled:
items unavailable
fraudulent order
customer changed/cancelled order
other
Returns the translated output of an order's order.cancel_reason.
Input
English: {{ order.cancel_reason }}
French: {{ order.cancel_reason_label }}
Output
English: Items unavailable
French: Produits indisponibles
Returns the timestamp of when an order was created. Use the date filter to format the timestamp.
Returns the customer associated with the order.
Returns the URL of the customer's account page.
Input
{{ order.name | link_to: order.customer_url }}
Output
<a href="http://johns-apparel.myshopify.com/account/orders/d94ec4a1956f423dc4907167c9ef0413">#1235</a>
Returns an array of discounts for an order.
Input
{% for discount in order.discounts %}
Code: {{ discount.code }}
Savings: {{ discount.savings | money }}
{% endfor %}
Output
Code: SUMMER16
Savings: -$20.00
The total amount of the discounts to be applied to the price of the order. Use one of the money filters to return the value in a monetary format.
Input
{{ discount.discounts_amount | money }}
Output
$25
The total savings from the discounts to be applied to the price of the order.
Input
{{ discount.discounts_savings | money }}
Output
$-25
Returns the email address associated with an order.
Returns the financial status of an order. The possible values are:
pending
authorized
paid
partially_paid
refunded
partially_refunded
voided
Returns the translated output of an order's financial_status.
Input
English: {{ order.financial_status }}
French: {{ order.financial_status_label }}
Output
English: Paid
French: Payée
Defined only for the following events, and in the following ways:
- a fulfillment event is created
- Returns the fulfillment for which the event occurred.
- a fulfillment event is deleted
- Returns the fulfillment for which the event occurred.
- a fulfillment is created
- Returns the fulfillment in question
- a fulfillment is updated
- Returns the fulfillment in question
Returns an array of the fulfillments for the order.
Defined only for the following events:
- a fulfillment event is created
- a fulfillment event is deleted
Returns the fulfillment event.
Returns the fulfillment status of an order.
Returns the translated output of an order's fulfillment_status.
Input
English: {{ order.fulfillment_status }}
French: {{ order.fulfillment_status_label }}
Output
English: Unfulfilled
French: Non confirmée
Returns the id of the order. This is used for Shopify's API purposes.
Returns the cumulative total count of all line items in the order.
Returns an array of line items for the order.
(POS only) Returns the physical location of the order. You can configure locations in the Locations settings of your Shopify admin.
Returns the name of the order in the format set in the Standards and formats section of the General settings of your Shopify admin.
Input
{{ order.name }}
Output
#1025
Returns the note associated with a customer order.
Input
Special instructions: {{ order.note }}
Output
Special instructions: Please deliver after 5 PM
Returns the URL pointing to the order status web page. The URL will be null unless the order was created from a checkout.
Defined for the following events:
- a refund is created
Returns a refund drop.
Returns the array of refund drops belonging to the order.
Returns the integer representation of the order name.
Input
{{ order.order_number }}
Output
1025
Returns true
if any line item in the order requires shipping, else false
.
Returns the shipping address of the order.
Returns the first element of order.shipping_methods
, or nil if order.shipping_methods
is nil.
Returns an array of shipping_method variables from the order.
Returns the shipping price of an order. Use a money filter to show the result as a monetary amount.
Defined for the following events:
- a fulfillment event is created
- a fulfillment event is deleted
- a fulfillment is created
- a fulfillment is updated
- a refund is created
- an order is cancelled
- an order is created
- an order is deleted
- an order is fulfilled
- an order is paid
- an order is partially fulfilled
- an order is updated
- an order transaction is created
Returns the shop drop.
Returns the name of here the order originated. Orders created through official Shopify channel have possible values of
- "web"
- "pos"
- "iphone"
- "android"
Orders created via the API may be assigned any other string, with the default of "api".
Returns the subtotal price of an order. Use a money filter to show the result as a monetary amount.
Returns an array of all of the order's tags. The tags are returned in no particular order.
Input
{% for tag in order.tags %}
{{ tag }}
{% endfor %}
Output
sale
leather
special
new
Returns an array of tax_line variables for an order.
Input
{% for tax_line in order.tax_lines %}
Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%): {{ tax_line.price | money }}
{% endfor %}
Output
Tax (GST 14.0%): $25
Returns the order's tax price. Use a money filter to show the result as a monetary amount.
Returns the total price of an order. Use a money filter to show the result as a monetary amount.
Defined only for the following event:
- an order transaction is created
Returns the transaction.
Returns an array of transactions from the order.