Compare Price Null in European Countries

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:

query Product  @inContext(country: DE) {
    product(id: "gid://shopify/Product/123") {
        id
        title
        variants(first: 1) {
            edges {
                node {
                    id
                    price {
                        amount
                        currencyCode
                    }
                    compareAtPrice {
                        amount
                        currencyCode
                    }
                }
            }
        }
    }
}

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.

2 Likes

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.

You may not be alone in this
Not receiving data for ā€˜compare-at-priceā€™ from Storefront API

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.

Hello,

Any solution for this problem ?

Thanks you

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.