Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
hi team,
We need to get discounted products to display off the Homepage.
For example, get products with price > Compare-at price
We tried the query below but it didn't work as expected
products(first: 5, query:"is_price_reduced:true") {
edges{
cursor
node
{
id
title
description
tags
variants(first:10)
{
edges
{
node
{
availableForSale
id
compareAtPrice
price
title
}
}
}
}
}
}
Is there any API or solution?
Thanks
Hau
Hi @AlexBoy 👋
Would you please try the query with `is_price_reduced:1` instead?
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Would you please confirm that all of the variants of returned product have null `compareAtPrice` fields? It would be expected for the product to be returned if any one of its variants have a reduced price.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
hi @ShopifyDevSup ,
@ShopifyDevSup wrote:Would you please confirm that all of the variants of returned product have null `compareAtPrice` fields? It would be expected for the product to be returned if any one of its variants have a reduced price.
All variants compareAtPrice is null
I am having the same issue, even when the compare_at_price is NULL. The "is_price_reduced" filter does not seem to work properly. Please see the results of this query:
I also have both a product and a product variant with reduced prices in the store that are NOT showing in the results:
Can you please help figure out what the issue is? This query is critical to our sale promotions.
Hi @ShopifyDevSup
We are also having an issue with the is_price_reduced query. It doesn't return products with reduced prices and doesn't seem to change the results at all. When I remove the query I get the exact same products.
I've tried using "is_price_reduced:1" as well, but it returns the same results.
Is this a bug or am I doing something wrong?