Skip to main content

My store default currency is GBP and I also have customers in the US with Shopify Markets managing payments in USD. My abandoned cart flow is showing the cart line items with the correct value numbers but it is using the wrong currency symbol.

For example, the line item price in Shopify is $7.00 but in the Klaviyo email they see it as £7.00. For the event data I see:

$currency_code: GBP

$value: 7

presentment_currency: USD

I am displaying the line items using this code:

{{ item.product.title }}

Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|floatformat:2 %}

Does anyone lknow how to correct this? Thanks.

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 :”.


Reply