Hi,
I’m developing a headless custom storefront for a Shopify Plus customer and I’m facing some issues related to international pricing.
When using a template you can have an app (like Geolocation) to retrieve prices based on the customer location. I’d want to replicate it using the Storefront API. I’m using the presentmentPrices property in the ProductVariant object that returns unique currency-price pairs. I’m setting prices for each product following the article Set Product Prices for a Country or Region. I know I can select presentmentPrices but that’s not enough.
The problem is, I want to show prices based on the location of the customer. If I’m adjusting prices to different EU countries, all of them using the currency EUR, ¿how could I retrieve the specific price for a product and a country? it would be great to have a header (like the Accept-Language header for languages) to send the customer’s country.
Additionally, for these currency-prices pairs returned in the presentmentPrices, which criteria is applied to select the price to return when there are multiple regions that share a currency?
I’ve performed some tests using different countries to run the requests (France, Italy, Spain, Ireland), having custom adjusted prices for each country, the API it’s not detecting the origin of the request (IP location, I mean) and it always returns the same EUR price, no matter the origin country.
I’m not seeing a way to achieve this with the Storefront API. How do you suggest to solve this issue?