liquid - Title: How to get accurate product prices in active currency using Shopify Storefront API? - Stack Overflow

admin2025-04-28  3

I’m working on a Shopify storefront that supports multiple currencies. My store’s base currency is USD, but customers can view and purchase products in other currencies like INR.

Here’s the issue I’m facing:

When fetching product prices via /products/productHandle.js (Shopify's Product JSON endpoint), I always get the accurate price for the active currency. For example:

For USD, I get 1000 cents (i.e., $10.00). For INR, I get 85898 cents (i.e., ₹858.98).

However, when I fetch the same product prices using the Shopify Storefront API (GraphQL), the prices always default to the store's base currency (USD), regardless of the active currency.

I attempted to use Shopify.currency.rates to convert the base currency price to the active currency. However, this results in inaccuracies.

Any possible way to get accurate price for every currencies (Active Currency) using Store Front API?

转载请注明原文地址:http://www.anycun.com/QandA/1745781508a91209.html