How can I only show products that have in-stock variants when selecting a collection filter option? #2483
Unanswered
rylanharper
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a working collection page with a filter that can filter out products based on certain criteria. The only small issue I am facing is that when I select a color option or size option, it still displays the product even if the corresponding filter option (variant color/size) is sold-out (or not
availableForSale
).So basically in my product that has a
Red
andYellow
color, where theRed
is in-stock, but theYellow
is out-of-stock, the filter will still show the product if I selectYellow
.I have found a solution that involves creating a whole new hook with some complex conditionals, but I feel like there should be a simple solution to this? Kind of odd that the official Search and Discovery App doesn't include an option for this.
Beta Was this translation helpful? Give feedback.
All reactions