Change log

{{ order }} object

This liquid object will output the order details of a submitted payment.

{{ this.order }}

Order Object Availability

Currently, this object’s structure, and where it can be accessed, varies depending on the type of payment being made. The following table indicates the locations that currently support the order Object Liquid and further below describes the order Object output for the supported locations, based on the various payment scenarios.

Location Order Object Availability
(by Payment Type)
Description
Generic SingleItem CheckOut
Confirmation/Redirect Page The confirmation page after the payment form submission (either system default or custom redirect page).
Workflow Email The Workflow Notification email/s sent to the site admin/s after payment form submission.
Workflow Email Fields The 'From' and 'Subject' fields for the Workflow Notification email/s.
Auto-response Email The Auto-response email sent to the user after payment form submission.
Auto-response Email Fields The 'From' and 'Subject' fields for the Auto-response email.
Invoice Email The Invoice system email sent to the user after payment form submission.
Invoice Email Fields The 'From' and 'Subject' fields for the Invoice email.
Supplier Email n/a n/a The Supplier Notification system email sent to the assigned supplier after payment form submission.
Supplier Email Fields n/a n/a The 'From' and 'Subject' fields for the Supplier Notification email.
Low Stock Email n/a n/a The Low Stock Notification system email sent to the site admin/s after payment form submission.
Low Stock Email Fields n/a n/a The 'From' and 'Subject' fields for the Low Stock Notification email.
Secure Zone Details Email ? ? The Secure Zone Login Details system email sent to the user after payment form submission.
Secure Zone Details Email Fields ? ? The 'From' and 'Subject' fields for the Secure Zone Details email.

Checkout (form type: checkout)

Receipt and Workflow Emails

The order object, after a checkout submission, in the ‘order-receipt’ system page and the checkout form’s Workflow Notification email/s (email template and email body).

{
  "Id": "5",
  "totalItemsCount": 1,
  "unitsCountHtml": "<span data-cms_cart_units_count="5">1</span>",
  "paymentType": null,
  "hasGiftVoucherProducts": false,
  "formatSetting": null,
  "domainCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "destinationCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "shippingOption": {
    "id": "12252410371037462531",
    "shippingOptionId": "7361027874612051969",
    "name": "Flat Shipping",
    "price": 5.0000,
    "taxPercent": 10.0000,
    "taxPrice": 0.50000000,
    "totalPrice": 5.50000000,
    "subTotalPrice": 5.0000
  },
  "discount": {
    "id": null,
    "code": null,
    "type": null,
    "amount": 0.0
  },
  "giftVoucher": {
    "id": null,
    "code": null,
    "amount": 0.0,
    "balance": 0.0
  },
  "discountPrice": 0.0,
  "subTotalPrice": 11.0000,
  "subTotalPriceHtml": "<span data-cms_cart_subtotal="5">$11.00</span>",
  "taxCodeId": "10696064456628109313",
  "taxPercent": 10.0000,
  "taxPrice": 1.0000,
  "taxPriceHtml": "<span data-cms_cart_tax_price="5">$1.00</span>",
  "totalPrice": 16.5000,
  "totalPriceHtml": "<span data-cms_cart_total="5">$16.50</span>",
  "discountPriceHtml": "<span data-cms_cart_discount_price="5">$0.00</span>",
  "giftVoucherPriceHtml": "<span data-cms_cart_gift_voucher_price="5">$0.00</span>",
  "giftVoucherPrice": 0.0,
  "shippingTotalPriceHtml": "<span data-cms_cart_shipping_price="5">$5.50</span>",
  "checkoutButtonHtml": "<button class="system_button" data-cms_cart_checkout="">checkout</button>",
  "clearCartHtml": "<button class="system_button" data-cms_cart_clear_card="">Clear cart</button>",
  "giftVoucherHtml": "<input type="text" data-cms_cart_gift_voucher="" value="">",
  "discountCodeHtml": "<input type="text" data-cms_cart_discount_code="" value="">",
  "items": [
    {
      "id": "15049017874163171330",
      "smallImage": null,
      "name": "T-Shirt",
      "type": "ModuleItem",
      "moduleId": 0,
      "SKUCode": "11223344",
      "quantity": 1,
      "Url": "/catalogs/t-shirt",
      "price": 10.0000,
      "taxPercent": 10.0000,
      "unitPrice": 10.0000,
      "taxPrice": 1.00000000,
      "unitTotalPrice": 11.00000000,
      "totalPrice": 11.00000000,
      "unitTotalPriceHtml": "<span data-cms_cart_item_total_unit_price="15049017874163171330">$11.00</span>",
      "priceHtml": "<span data-cms_cart_item_price="15049017874163171330">$10.00</span>",
      "unitPriceHtml": "<span data-cms_cart_item_subtotal_price="15049017874163171330">$10.00</span>",
      "taxPriceHtml": "<span data-cms_cart_item_tax="15049017874163171330">$1.00</span>",
      "totalHtmlPrice": "<span data-cms_cart_item_total_price="15049017874163171330">$11.00</span>",
      "quantityHtml": "<input type="number" value="1" data-cms_cart_item_quantity="15049017874163171330">",
      "removeHtml": "<a href="javascript:" data-cms_cart_remove_order_line="15049017874163171330"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0" 0="" 24="" 24\"=""><path d="M19" 6.41l17.59="" 5="" 12="" 10.59="" 6.41="" 17.59="" 19="" 13.41="" 12z\"=""></path><path d="M0" 0h24v24h0z\"="" fill="none"></path></svg></a>",
      "attributes": [
        {
          "id": "12550665647534637059",
          "name": "Colour",
          "attributeType": "0",
          "valueType": "FixedPrice",
          "options": [
            {
              "id": "749807479205920773",
              "name": "Green",
              "price": 0.0000,
              "taxPercent": 10.0000,
              "taxPricet": 0.00000000,
              "totalPrice": 0.00000000
            }
          ],
          "subTotalPrice": 0.0000,
          "taxPercent": 10.0000,
          "taxPrice": 0.00000000,
          "price": 0.0000,
          "totalPrice": 0.00000000
        }
      ]
    }
  ]
}

Invoice and Supplier Emails

The order object, after a checkout submission, in the ‘Invoice’ system email and the ‘Supplier Notification’ system email (if a dropship supplier is enabled for a product in the order) (email template and email body).

{
  "id": "12877807959236673563",
  "State": "Succeed",
  "formId": 0,
  "memberId": 1,
  "caseId": 0,
  "name": "Checkout 21 Apr 2020 10:59 PM",
  "invoiceNumber": 10,
  "invoiceDate": "2020-04-21T12:59:15.7350338Z",
  "formatSetting": {
    "name": "AUD",
    "culture": "en-AU",
    "decimalsQuantity": 2,
    "currency": {
      "code": "AUD",
      "symbol": "$",
      "digitalCode": "36",
      "name": "Australian Dollar"
    }
  },
  "domainCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "destinationCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "shippingOption": {
    "id": "12252410371037462539",
    "shippingOptionId": "7361027874612051969",
    "name": "Flat Shipping",
    "price": 5.0000,
    "taxPercent": 10.0000,
    "taxPrice": 0.50000000,
    "totalPrice": 5.50000000,
    "subTotalPrice": 5.0000
  },
  "discount": {
    "id": null,
    "code": null,
    "type": null,
    "amount": 0.0
  },
  "discountPrice": 0.0,
  "giftVoucher": {
    "id": null,
    "code": null,
    "amount": 0.0,
    "balance": 0.0
  },
  "paymentType": "CreditCard",
  "amountPending": 0.0,
  "amountPaid": 16.5000,
  "subTotalPrice": 11.0000,
  "taxPercent": 10.0000,
  "taxPrice": 1.0000,
  "totalPrice": 16.5000,
  "items": [
    {
      "id": "15049017874163171340",
      "smallImage": null,
      "name": "T-Shirt",
      "type": "ModuleItem",
      "moduleId": 0,
      "SKUCode": "11223344",
      "quantity": 1,
      "Url": "/catalogs/t-shirt",
      "price": 10.0000,
      "taxPercent": 10.0000,
      "unitPrice": 10.0000,
      "taxPrice": 1.00000000,
      "unitTotalPrice": 11.00000000,
      "totalPrice": 11.00000000,
      "unitTotalPriceHtml": "<span>$11.00</span>",
      "priceHtml": "<span>$10.00</span>",
      "unitPriceHtml": "<span>$10.00</span>",
      "taxPriceHtml": "<span>$1.00</span>",
      "totalHtmlPrice": "<span>$11.00</span>",
      "quantityHtml": "<input type="number" value="1">",
      "removeHtml": "<a><u></u><u></u><u></u><u></u></a>",
      "attributes": [
        {
          "id": "12550665647534637063",
          "name": "Colour",
          "attributeType": "0",
          "valueType": "FixedPrice",
          "options": [
            {
              "id": "749807479205920777",
              "name": "Green",
              "price": 0.0000,
              "taxPercent": 10.0000,
              "taxPricet": 0.00000000,
              "totalPrice": 0.00000000
            }
          ],
          "subTotalPrice": 0.0000,
          "taxPercent": 10.0000,
          "taxPrice": 0.00000000,
          "price": 0.0000,
          "totalPrice": 0.00000000
        }
      ]
    }
  ],
  "giftVoucherPrice": 0.0,
  "discountPriceHtml": "<span>$0.00</span>",
  "taxPriceHtml": "<span>$1.00</span>",
  "shippingTotalPriceHtml": "<span>$5.50</span>",
  "giftVoucherPriceHtml": "<span>$0.00</span>",
  "totalPriceHtml": "<span>$16.50</span>",
  "amountPaidHtml": "<span>$16.50</span>",
  "amountPendingHtml": "<span>$0.00</span>"
}

Low Stock Email

The order object, after a checkout submission, in the ‘Low Stock Notification’ system email (if any ordered products trigger the low stock threshold) (email template and email body).

{
  "domain": "https://YOUR-DOMAIN.com/",
  "products": [
    {
      "orderLineId": "15049017874163171333",
      "quantity": 1,
      "unitPrice": 10.0000,
      "taxRate": 0.1000,
      "taxPrice": 1.00000000,
      "totalPrice": 11.00000000,
      "price": 10.0000,
      "type": 0,
      "moduleId": 1859,
      "sKUCode": "11223344",
      "name": "T-Shirt",
      "smallImage": null,
      "instock": 3,
      "attributes": [
        {
          "name": "Colour",
          "options": [
            {
              "name": "Green"
            }
          ]
        }
      ]
    }
  ],
  "totalCount": 1
}

Form Payment (form type: generic)

Invoice Email

The order object, after a generic payment collection form submission, in the ‘Invoice’ system email (email template and email body).

{
  "id": "12877807959236673554",
  "State": "Succeed",
  "formId": 0,
  "memberId": 1,
  "caseId": 0,
  "name": "PAYMENT FORM NAME 20 Apr 2020 04:03 PM",
  "invoiceNumber": 6,
  "invoiceDate": "2020-04-20T06:03:06.6730219Z",
  "formatSetting": {
    "name": "AUD",
    "culture": "en-AU",
    "decimalsQuantity": 2,
    "currency": {
      "code": "AUD",
      "symbol": "$",
      "digitalCode": "36",
      "name": "Australian Dollar"
    }
  },
  "domainCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "destinationCountry": {
    "name": null,
    "code": null
  },
  "shippingOption": {
    "id": "12252410371037462535",
    "shippingOptionId": null,
    "name": null,
    "price": 0.0,
    "taxPercent": 0.0,
    "taxPrice": 0.0,
    "totalPrice": 0.0,
    "subTotalPrice": 0.0
  },
  "discount": {
    "id": null,
    "code": null,
    "type": null,
    "amount": 0.0
  },
  "discountPrice": 0.0,
  "giftVoucher": {
    "id": null,
    "code": null,
    "amount": 0.0,
    "balance": 0.0
  },
  "paymentType": "CreditCard",
  "amountPending": 0.0,
  "amountPaid": 5.2,
  "subTotalPrice": 5.2,
  "taxPercent": 0.0,
  "taxPrice": 0.0,
  "totalPrice": 5.2,
  "items": [
    {
      "id": "15049017874163171336",
      "smallImage": null,
      "name": "PAYMENT FORM NAME",
      "type": null,
      "moduleId": 0,
      "SKUCode": "PAYMENT FORM NAME",
      "quantity": 1,
      "Url": null,
      "price": 5.2,
      "taxPercent": 0.0,
      "unitPrice": 5.2,
      "taxPrice": 0.0,
      "unitTotalPrice": 5.2,
      "totalPrice": 5.2,
      "unitTotalPriceHtml": "<span>$5.20</span>",
      "priceHtml": "<span>$5.20</span>",
      "unitPriceHtml": "<span>$5.20</span>",
      "taxPriceHtml": "<span>$0.00</span>",
      "totalHtmlPrice": "<span>$5.20</span>",
      "quantityHtml": "<input type="number" value="1">",
      "removeHtml": "<a><u></u><u></u><u></u><u></u></a>",
      "attributes": []
    }
  ],
  "giftVoucherPrice": 0.0,
  "discountPriceHtml": "<span>$0.00</span>",
  "taxPriceHtml": "<span>$0.00</span>",
  "shippingTotalPriceHtml": "<span>$0.00</span>",
  "giftVoucherPriceHtml": "<span>$0.00</span>",
  "totalPriceHtml": "<span>$5.20</span>",
  "amountPaidHtml": "<span>$5.20</span>",
  "amountPendingHtml": "<span>$0.00</span>"
}

Secure Zone/Membership Payment (form type: generic)

Invoice Email

The order object, after a paid Secure Zone payment form submission, in the ‘Invoice’ system email (email template and email body).

{
  "id": "12877807959236673558",
  "State": "Succeed",
  "formId": 0,
  "memberId": 1,
  "caseId": 0,
  "name": "ZONE FORM NAME (subscription)",
  "invoiceNumber": 8,
  "invoiceDate": "2020-04-20T06:24:42.8256522Z",
  "formatSetting": {
    "name": "AUD",
    "culture": "en-AU",
    "decimalsQuantity": 2,
    "currency": {
      "code": "AUD",
      "symbol": "$",
      "digitalCode": "36",
      "name": "Australian Dollar"
    }
  },
  "domainCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "destinationCountry": {
    "name": null,
    "code": null
  },
  "shippingOption": {
    "id": "12252410371037462537",
    "shippingOptionId": null,
    "name": null,
    "price": 0.0,
    "taxPercent": 0.0,
    "taxPrice": 0.0,
    "totalPrice": 0.0,
    "subTotalPrice": 0.0
  },
  "discount": {
    "id": null,
    "code": null,
    "type": null,
    "amount": 0.0
  },
  "discountPrice": 0.0,
  "giftVoucher": {
    "id": null,
    "code": null,
    "amount": 0.0,
    "balance": 0.0
  },
  "paymentType": "CreditCard",
  "amountPending": 0.0,
  "amountPaid": 6.3000,
  "subTotalPrice": 6.3000,
  "taxPercent": 0.0,
  "taxPrice": 0.0,
  "totalPrice": 6.3000,
  "items": [
    {
      "id": "15049017874163171338",
      "smallImage": null,
      "name": "ZONE NAME",
      "type": "SecureZoneSubscription",
      "moduleId": 0,
      "SKUCode": "ZONE NAME",
      "quantity": 1,
      "Url": null,
      "price": 6.3000,
      "taxPercent": 0.0000,
      "unitPrice": 6.3000,
      "taxPrice": 0.00000000,
      "unitTotalPrice": 6.30000000,
      "totalPrice": 6.30000000,
      "unitTotalPriceHtml": "<span>$6.30</span>",
      "priceHtml": "<span>$6.30</span>",
      "unitPriceHtml": "<span>$6.30</span>",
      "taxPriceHtml": "<span>$0.00</span>",
      "totalHtmlPrice": "<span>$6.30</span>",
      "quantityHtml": "<input type="number" value="1">",
      "removeHtml": "<a><u></u><u></u><u></u><u></u></a>",
      "attributes": []
    }
  ],
  "giftVoucherPrice": 0.0,
  "discountPriceHtml": "<span>$0.00</span>",
  "taxPriceHtml": "<span>$0.00</span>",
  "shippingTotalPriceHtml": "<span>$0.00</span>",
  "giftVoucherPriceHtml": "<span>$0.00</span>",
  "totalPriceHtml": "<span>$6.30</span>",
  "amountPaidHtml": "<span>$6.30</span>",
  "amountPendingHtml": "<span>$0.00</span>"
}

Event Payment (form type: singleItem)

Invoice Email

The order object, after a paid Event payment form submission, in the ‘Invoice’ system email (email template and email body).

{
  "id": "12877807959236673560",
  "State": "Succeed",
  "formId": 0,
  "memberId": 1,
  "caseId": 0,
  "name": "EVENT FORM NAME 20 Apr 2020 05:01 PM",
  "invoiceNumber": 9,
  "invoiceDate": "2020-04-20T07:01:43.7294453Z",
  "formatSetting": {
    "name": "AUD",
    "culture": "en-AU",
    "decimalsQuantity": 2,
    "currency": {
      "code": "AUD",
      "symbol": "$",
      "digitalCode": "36",
      "name": "Australian Dollar"
    }
  },
  "domainCountry": {
    "name": "AUSTRALIA",
    "code": "AU"
  },
  "destinationCountry": {
    "name": null,
    "code": null
  },
  "shippingOption": {
    "id": "12252410371037462538",
    "shippingOptionId": null,
    "name": null,
    "price": 0.0,
    "taxPercent": 0.0,
    "taxPrice": 0.0,
    "totalPrice": 0.0,
    "subTotalPrice": 0.0
  },
  "discount": {
    "id": null,
    "code": null,
    "type": null,
    "amount": 0.0
  },
  "discountPrice": 0.0,
  "giftVoucher": {
    "id": null,
    "code": null,
    "amount": 0.0,
    "balance": 0.0
  },
  "paymentType": "CreditCard",
  "amountPending": 0.0,
  "amountPaid": 11.00000000,
  "subTotalPrice": 11.00000000,
  "taxPercent": 0.0,
  "taxPrice": 1.00000000,
  "totalPrice": 11.00000000,
  "items": [
    {
      "id": "15049017874163171339",
      "smallImage": null,
      "name": "EVENT NAME",
      "type": "ModuleItem",
      "moduleId": 0,
      "SKUCode": "79ab1557-8e3f-47f6-ac0c-3cdf78633e9a",
      "quantity": 1,
      "Url": "/event/EVENT-NAME",
      "price": 10.0000,
      "taxPercent": 10.0000,
      "unitPrice": 10.0000,
      "taxPrice": 1.00000000,
      "unitTotalPrice": 11.00000000,
      "totalPrice": 11.00000000,
      "unitTotalPriceHtml": "<span>$11.00</span>",
      "priceHtml": "<span>$10.00</span>",
      "unitPriceHtml": "<span>$10.00</span>",
      "taxPriceHtml": "<span>$1.00</span>",
      "totalHtmlPrice": "<span>$11.00</span>",
      "quantityHtml": "<input type="number" value="1">",
      "removeHtml": "<a><u></u><u></u><u></u><u></u></a>",
      "attributes": []
    }
  ],
  "giftVoucherPrice": 0.0,
  "discountPriceHtml": "<span>$0.00</span>",
  "taxPriceHtml": "<span>$1.00</span>",
  "shippingTotalPriceHtml": "<span>$0.00</span>",
  "giftVoucherPriceHtml": "<span>$0.00</span>",
  "totalPriceHtml": "<span>$11.00</span>",
  "amountPaidHtml": "<span>$11.00</span>",
  "amountPendingHtml": "<span>$0.00</span>"
}

Accessing the Data

As an example of rendering a piece of this data onto your Invoice email layout you could use the following Liquid:

{{ this.order.totalPriceHtml }}{{ this.order.formatSetting.currency.code }}

This would output the value $11.00AUD to the layout based on the above example data.

Extending on this example, we can use this data in a conditional Liquid statement to display custom information to the customer:

{% if this.order.totalPrice > 100 %} <!-- Order over $100 -->
    <h2>Congratulations!</h2>
    <p>Your order qualifies for a complimentary $10 Gift Card which we'll send out with your purchase.</p>
{% else %} <!-- if the order is $100 or less -->
    <h2>Thank you!</h2>
    <p>We hope you like your new purchase.<br>
    Remember, if you spend over $100 you'll receive a bonus $10 Gift Card!</p>
{% endif %}


Related Articles

  • System Pages
    System Pages, under 'Settings', is where you’ll find all those pages required by certain system...
  • Custom Reports
  • form
    This component outputs data relating to a specific Form. {% capture data %} {% raw...
  • Form Submissions
  • System Emails
    System emails are emails that are sent when a particular action is carried out on the website and/or via the admin.
  • {{ formSubmissionData }} object
    This liquid object will output the submission details of a Form.
  • {{ workflow }} object
    This liquid object will output the Workflow details of a submitted Form. You can use...
  • Advanced CRM Groups
  • Forms
    Forms are an essential part of collecting user information on your website.
    Treepl CMS makes managing forms easy and powerful
  • Secure Zones
    Secure Zones provide a way of creating restricted content on your website that only registered Secure Zone Members are able to access after successfully logging in.
  • ReCaptcha Styling
    Treepl CMS supports Google reCAPTCHA v2 and v3 implementations. Below are some additional options you...

External Resources

There are currently no external resources available.

Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.


Questions?

We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.