Hey @TurnedArt
Welcome to the community, happy to help!
Check out these other community post on the same topic!
In case it helps anyone, Shopify sends a “presentment_currency” parameter for events such as Added to Cart and Checkout Started, which you can use in the following way to present dynamic currrencies.
I imagine other eCommerce platforms will send a similar parameter which you could use to conditionally display currencies - much easier to manage than needing to use conditional splits and have an email per currency!
{% if event.extra.presentment_currency == 'GBP' %}
£{{ item.line_price|floatformat:2 }}
{% elif event.extra.presentment_currency == 'EUR' %}
€{{ item.line_price|floatformat:2 }}
{% elif event.extra.presentment_currency == 'USD' %}
${{ item.line_price|floatformat:2 }}
{% else %}
{{ item.line_price|floatformat:2 }}
{% endif %}
The above uses the {{ event.extra.presentment_currency }} value (which you can find if you “Preview” your email and look at the parameters displayed on the right hand side) and displays…
- £ - if the currency is GBP
- € - if the currency is EUR
- $ - if the currency is USD
- Just the numerical price - all else
By changing the if and elif statements to other 3-digit ISO currency codes, you could extend this if needed.
To wrap this up, you would change the code below…
{{ item.product.title }}
Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|floatformat:2 %}
to…
{{ item.product.title }}
Quantity: {{ item.quantity|floatformat:0 }} — Total: {% if event.extra.presentment_currency == 'GBP' %}
£{{ item.line_price|floatformat:2 }}
{% elif event.extra.presentment_currency == 'EUR' %}
€{{ item.line_price|floatformat:2 }}
{% elif event.extra.presentment_currency == 'USD' %}
${{ item.line_price|floatformat:2 }}
{% else %}
{{ item.line_price|floatformat:2 }}
{% endif %}
Essentially, just copying and pasting my snippet above to sit after “Total :”.