Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We are working on a feature where we want to add support for multi-currency so customers can pay through their local currency.
To achieve the functionality, we have a requirement to retrieve currency conversion rate within liquid. We did a lot of R&D and tried possible solutions, however, couldn't succeed.
We found that the rate can be obtained through a piece of JS code: window.Shopify.currency.rate, but this works on the storefront. If we use this way, it will add huge complexity to our code and execution.
How can we obtain currency conversion rate through liquid?
Did you find a solution for this? Has anything changed?
Hi Rose,
You can update the daily currency rate in metafields via say a script. Then, use Liquid to show these rates and calculate prices.
For instance, the liquid code could look like:
{% assign conversion_rate = shop.metafields.global.usd_to_gbp.value | default: 1.38 %}
{% assign product_price_gbp = product.price | times: conversion_rate %}
{{ product_price_gbp | money_with_currency }}
Let me know if you need any help!
Where can I find currency rate?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025