Hi,
I have a whole store that has products based on variants. I don’t have any simple product and each variant has separate inventory.
How can I add filtering of the product by size but based on the stock of the size? E.g. I have a number of products in sizes 36 to 41, but only some of them have stock levels greater than 0. I want, by selecting, for example, size “38” in the filter, for the query loop to display only products that currently have this size in stock (stock levels greater than 0).
Attributes maybe, but the problem arises in variants. Because each variant has a separate stock, and unfortunately this I can not add fo filters in any way.
Just so we understand each other - is there an option to plug in 1 button that will filter both by a given size and by its stock status for variants? Do I need to have two buttons for filtering - one to specify the size and the other to specify the stock status?
Unfortunately, it didn’t work. I select pa size (indexed attributes), then the radio button with “instock” and it still shows me the same product all the time even though I select the size that has “instock” 0 for the variant with that size selected in the second filter.