We have a shopify website linked to klaviyo. The prices for each product are without VAT. When showing this in mails (e.g. for abandoned cart products), I need to show the total price. We managed to do this with the multiply function.
Price: {% currency_format item.line_price|multiply:1.21|floatformat:1 %}
However, the discount field works the same way. I cannot use the same exact formula, because there are:
- discounts with a percentage (uses the non-VAT price to calculate this → we need to multiply this)
- discounts with a fixed amount → we do not need to multiply this
The discounts are created in shopify.
Any ideas on how to navigate this? I was thinking in the lines of:
- is there a way to add an if/else statement to the multiply part? (we could make sure each code name has a specific part in the name to use in the if/else statement)
- duplicate the discount block, make one for fixed amounts and one for percentages, and then use show/hide logic? (but how to create the logic then)
- …?