I’m trying to edit the shopping cart to display total GST on an order. Has anyone done this? I am assuming that the product price is entered ex GST and gst is calculated in the total price?
I’m trying this {{shoppingCartData.totalPriceHtml | subtract : shoppingCartData.subTotalPriceHtml | domain_money_format}}
You have the taxPriceHtml
or taxPrice
properties which should display the tax amount.
eg:
{{shoppingCartData.taxPrice}}
In your code sample, that idea could work as well but you’d need to use the raw number values (totalPrice
) instead of the HTML output (totalPriceHtml
) if you want to run calculations on price values.
See also here for more on the shoppingCart object:
https://docs.treepl.co/component-types/shopping_cart