Which liquid tags can I use on the templates?

You can use the following liquid tags inside your templates:

shop:

{{shop.name}}

{{shop.url}}

order:

{{order.url}}

{{order.total_line_items_price}}

{{order.line_items}}

item:

{{item.title}}

{{item.price}}

{{item.quantity}}

{{item.product.image_url}}

{{item.product.url}}

customer

{{order.customer.first_name}}

{{order.customer.last_name}}

 

Remember to loop inside order.line_items in order to have a full list of the items in the cart:

{% for item in order.line_items %}
<p>
{{item.title}}<br />
{{item.price}}, Quantity: {{item.quantity}}
</p>
{% endfor %}

or

{% for item in order.line_items %}
<p>
<a href="{{item.product.url}}"><img src="{{item.product.image_url}}" style="height:50px; width:50px" /> {{item.title}}</a><br/>
{{item.price}}, Quantity: {{item.quantity}}
</p>
{% endfor %}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments