ItemTax - Liquid Object Reference
On this page
Description
The ItemTax object is one tax jurisdiction’s share of the tax on a single cart or order line. A line taxed by more than one jurisdiction has one entry for each.
When the store calculates tax with a tax provider such as AvaTax, the entries come from the provider’s response. Otherwise, they come from the store’s own tax records. For the store-wide taxes on a whole cart or order, use the taxes attribute of the Cart or Order instead, which returns Tax objects.
Attributes
| Attribute | Type | Description |
|---|---|---|
amount |
Number | Returns the tax amount for this line, for the full quantity |
name |
String | Returns the name of the tax jurisdiction |
rate |
Number | Returns the tax rate as a percentage, such as 10 for 10% |
Example
Show the tax breakdown under each line in the cart:
```liquid
{%- for item in current_cart.items %}
{{ item.name }}
{%- for tax in item.taxes %} <p>{{ tax.name }} ({{ tax.rate }}%): {{ tax.amount | money }}</p> {%- endfor %} {%- endfor %} ```
Available on
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.