Since a couple of days we are having an issue with the Storefront API products query. Merchants maintained compare prices in their Shopify admin as they used, but Storefront API does not show them when running a simple query like below:
If we remove the context directive or set it to āUSā the compare price is shown. However, if we set it to any europoean country like āDEā or āFRā the returned compare price is null.
Just incase prices havenāt been set for each market,
Can you try exporting the products and checking the compare at price columns for all markets.
See if they are empty and if they are, try populating them with values.
hi @Taksh_Shah , when exporting product data, I can see that market specific compare-at-price is not set, however, specific compare-at price is not set for any of the market, but it does not work only for EU countries.
This is a screenshot from Shopify own Compare at price sample snowboard, where we can reproduce this issue. The snowboard has variant price and compare at variant price.
There is no specific price in any of the market that deviates from the main compare at price. This product returns compare-at price for non-European countries (US, Canada, Malaysia, New Zealand, Australia, UK), but does not return it for EU countries (Germany, Ireland, Czech Republic, Italy, France).
If having a dedicated compare-at price maintained in the market were a requirement, then it wouldnāt have worked for US either, because specific US price is not managed, yet API returns the value.
Hi @clementbouakil , actually learned that this is not a bug but a feature? In the Admin/Market/Preferences there is a toggle to hide compare-at prices for EEA countries that was automatically enabled for merchants in Europe.
The feature has been out there for a while now, but started impacting Storefront API only recently. Deactivating this fixes the problem.