Order Variables

Variable Usage
order.billingAddress Returns the billing address object associated with the order.
{{ order.billingAddress.first_name }}
{{ order.billingAddress.last_name }}
{{ order.billingAddress.phone }}
{{ order.billingAddress.street_address }}
{{ order.billingAddress.city }}
{{ order.billingAddress.state }}
{{ order.billingAddress.country }}
order.shippingAddress Returns the shipping address object associated with the order.
{{ order.shippingAddress.first_name }}
{{ order.shippingAddress.last_name }}
{{ order.shippingAddress.phone }}
{{ order.shippingAddress.street_address }}
{{ order.shippingAddress.city }}
{{ order.shippingAddress.state }}
{{ order.shippingAddress.country }}
order.created_at Returns the date the order was created at.
<p><strong>Order Date: </strong> {{ order.created_at.format('M jS, Y') }}</p><br>
order.customer Returns the customer object associated with the order.
{% for customer in order.customer %}      {{ customer.first_name }}{% endfor %}<br>
order.getItemQuantity() Returns the total quantity of items in the order.
{{ order.getItemQuantity() }}<br>
order.id Returns the id for the order.
<p><strong>Order id: </strong> #{{ order.id }} </p><br>    
order.invoices Returns a collection of invoices associated with the order.
{% for invoice in order.invoices %}  
  {% for shipment in invoice.shipments %}   
    {% for item in shipment.shipmentItems %}         
      <h3><a href="/product/{{ item.product.url_name }}">{{ item.product.name }}</a></h3>    
    {% endfor %}  
  {% endfor %
}{% endfor %}
order.isPaid() Returns a boolean value for the paid status of the order.
<p><strong>Order paid status: </strong>{% if order.isPaid() %}  Paid{% else %}  Unpaid{% endif %}</p><br>
order.number Returns the order number.
{{ order.number }}
order.orderItems Returns a collection of items associated with the order.
{% for item in order.orderItems %}   {{ item.name }}{% endfor %}<br>
order.orderStatus.code Returns the API code associated with the order status.
{{ order.orderStatus.code }}<br>
order.orderStatus.color Returns the hexadecimal color code value associated with the order status.
<span class="label" style="background-color: {{ order.orderStatus.color }};"><br><br>
order.orderStatus.name Returns the name associated with the order status.
<h5>This order is currently 
  <span class="label" style="background-color: {{ order.orderStatus.color }};">
    {{ order.orderStatus.name }}  
  </span> and has been since
  {{ order.status_updated_at }}</h5>  
order.outputTrackingCodes() Returns tracking code(s) entered on the shipping tab for the order.
{{ order.outputTrackingCodes() }}
order.status_updated_at Returns a timestamp for the last status update for the order.
<h5>This order is currently   
  <span class="label" style="background-color: {{ order.orderStatus.color }};"> 
    {{ order.orderStatus.name }}  
  </span> and has been since   
  {{ order.status_updated_at }}</h5>
order.subtotal_invoiced Returns the the subtotal amount for the order.
<p><strong>Subtotal:</strong><i>{{ order.subtotal_invoiced|currency }}</i></p><br><br>
order.total Returns the total amount for the order, including taxes, discounts and shipping.
<p><strong>Total:</strong><i>{{ order.total|currency }}</i></p><br><br>
order.total_sales_tax| Returns the total sales tax amount for the order.
<p><strong>Sales Tax:</strong><i>{{ order.total_sales_tax|currency }}</i></p><br><br>
order.total_shipping_quote Returns the shipping total amount for the order.
<p><strong>Shipping:</strong><i>{{ order.total_shipping_quote|currency }}</i></p><br><br>
order.total_shipping_tax Returns the total tax amount for shipping.
<p><strong>Shipping Taxes:</strong><i>{{ order.total_shipping_tax|currency }}</i></p><br><br>
order.buyer_accepts_marketing Returns a boolean value representing the buyer's accepts marketing field.
{{ order.buyer_accepts_marketing }}
order.getCustomFieldsArray() Returns array of key/value pairs from configured custom fields.
{{ order.getCustomFieldsArray() }}
order.card Returns a credit card the order was paid with.
{{ order.card.brand }}
order.card.brand Returns the brand of a credit card (e.g. 'MasterCard').
{{ order.card.brand }}
order.card.card_and_brand Returns the card number and brand of a credit card (e.g. 'XXXX-XXXX-XXXX-4444 (MasterCard)').
{{ order.card.card_and_brand }}
order.card.sanitized_card_number Returns the sanitized card number of a credit card (e.g. 'XXXX-XXXX-XXXX-4444').
{{ order.card.sanitized_card_number }}
order.card.last_4 Returns the last four digits of a credit card (e.g. '4444').
{{ order.card.last_4 }}
order.shippingMethod Returns a shipping method associated with the order.
{{ order.shippingMethod.name }}
order.shippingMethod.name Returns the name of a shipping method associated with the order.
{{ order.shippingMethod.name }}
order.setup_fee Returns the setup_fee flat amount saved during a subscription order's creation. For example, a 10% setup fee on $100 would save this value at $10 (note the setup fee referred to here is the Billing Plan setup fee).
{{ order.setup_fee }}
order.hasUpcomingOrders() Returns true if an order is associated with an upcoming order.
{% iorder.hasUpcomingOrders() %}
    {# Do if true. #}
{% endif %}
order.upcomingOrders Returns a collection of upcoming orders associated with an order.
{% for upcomingOrder in invoice.order.upcomingOrders %}
  {# Render order details... #}
   Order ID: {{ order.id }}
{% endfor %}