{% assign dvtprice = currentvariant.price %}
{% assign dvtpriceprat = currentvariant.price | times :20 | dividedby :100 %}
Example: if product price is 20.33 , then Vat= (20.33*2)/100=4.066
{% assign dvtprice = currentvariant.price %}
{% assign dvtpriceprat = currentvariant.price | times :20 | dividedby :100 %}
Example: if product price is 20.33 , then Vat= (20.33*2)/100=4.066
3
Answers
I think that this was the way – change
times: 20
totimes: 20.00
.By the way your
dividedby
is wrong it should bedivided_by
.This isn’t possible with Shopify. The core code handles prices to two decimal places, so it will round if appropriate for embedded taxes.
example:
Input
{{ 183.3574456 | round: 4 }}
Output
183.3674