Discussing APIs and development related to customers, discounts, and order management.
Hello. I'm looking at the documentation for additional checkout scripts and can't find any definitive information about what Liquid objects are available. The documentation says "you are able to use the `shop` Liquid object, the `order` Liquid object, and the `OrderStatus` JavaScript asset." However, the examples further down the page refer to other top-level objects/variables such as `total_price` and `line_items`, and in our live additional checkout scripts we have other variables such as `subtotal_price`.
There is a page with all of the JS variables (at the bottom of this page), but not an equivalent that I can find for what Liquid variables are available.
Where can I find a full list of Liquid objects/variables that are available in the additional checkout scripts? Or is it the case that all properties of the order object are available as top-level variables too?
Anyone able to help?
Many thanks!
Hi Richard,
You're correct, `total_price`, `line_items`, and `subtotal_price` are all properties of the `order` object, so you can use any of the order properties (and shop properties).
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks for getting back to me Liam. Perhaps the documentation could be updated to reflect that all of the "order" object's properties are available as top-level variables (unless I have missed that somewhere)?