Multicurrency Price Conversion

New Member
4 0 0

Hi Shopify team!

 

I’m Praagya Joshi, software engineer for the Algolia Shopify app (https://www.algolia.com/solutions/shopify/).
We are currently working on adding support for multi currency and I'm looking for a solution to convert prices on the frontend while displaying search results

 

However, I’m running into a few issues:

 

  1. Getting the conversion rate
    I could not find a way to get the conversion rate between the store currency and presentment currency listed in the documentation.
    However, I did find a `Shopify.currency` object apparently inserted by `{{ content_for_header }}` liquid variable.
    Question:
    Can this property be relied on to do the conversion of prices?

  2. Getting the rounding strategy
    I could not find a way to fetch the rounding strategy in use for a store. Since we need to display accurate prices in the search results, we access to this information is quite important.
    Question:
    Is there a way to fetch this information either through an API call, Liquid variable or JavaScript object?

I found a similar question on this forum and I was wondering if things have changed since then.

 

Thank you for the help!

0 Likes
Shopify Staff
Shopify Staff
152 25 22

Hey @praagya_joshi,

 

I'm afraid not much has changed since that post. The conversion rate data isn't publicly available. Interestingly, the rounding strategy seems to be a fixed amount now (not adjustable by each store).

 

Can this property be relied on to do the conversion of prices?

At your own risk, this could change.

 

0 Likes
New Member
4 0 0

Thank you for the reply, @scottydont.

Will it be possible for you to shed some light on the rounding strategy in use for the stores?

 

0 Likes
Shopify Staff
Shopify Staff
152 25 22

For sure, you can view these in the Shopify Payments settings:

 

08-23-b9qfe-dnt5m(2).jpg 

0 Likes
New Member
4 0 0

Thank you once again @scottydont for your reply.

 

While it's possible to see the rounding strategy in a shop's settings, is there any way to get it programatically?

As our solution works on multiple stores which will have different currencies enabled, it'll be ideal if we can fetch it via an API/liquid variable/some other resource.

0 Likes
Shopify Staff
Shopify Staff
152 25 22

Hey @praagya_joshi,

 

Understandable. I don't believe this information is exposed by the API.

0 Likes