How To: Obtain currency conversion rate through liquid?

SGWH
Shopify Partner
7 0 21

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?

Replies 2 (2)

SGSdev
Shopify Partner
18 2 7

I also need to get the currency rate with liquid. @Shopify please respond.

Rose_CWC
Shopify Expert
5 0 0

Did you find a solution for this? Has anything changed?

www.creativewebco.com