Good afternoon everyone
. I have a filter by sizes which are as variants and when filtering it brings me the products that I do not have in stock. I would be very grateful if someone could give me a recommendation to be able to use the filters correctly. Thank you very much to all!
site: www.kalascouture.com
Hi @Kalascouture I have gone through your site and got your issue.
If the product is soldout and you are not taking preorder for that product then you should draft that product so that no customer will be able to see the product. Because even if customer is right now viewing that product but they are unable to order it or take any action, in this way you will be loosing potential customer who should have bought some other product if the sold out product will not be their.
So in this case you just simply Draft all the product which are soldout and not available for preorder and your filter will be working perfectly fine.
If you need any assistance then please feel free to ask the same.
Hopefully it will help you. If yes then Please hit Like and Mark it as solution!
Best Regards
Sahil
Hi @Kalascouture How about use “Shopify Search & Discovery” from Shopify ? There you can setup filter by product option, eq: Size variant.
Hopefully it will help you. If yes then Please hit Like and Mark it as solution!
The product may not be completely soldout, there might be only some variant
that are sold out.. It will be highly manual removal each variant after a
sale. Please help
I already uses search and discovery for my shop filters.
example:
When user selects filter size as S and available as is available.. page should not show this product.. but it shows.. thats what i am trying to resolve
Ahh I see, First I need to tell you that in Search and discovery, dont use Tag as filter for the “Size” but use Product Option and in URL you will see

Instead /collections/new-arrivals?sort_by=best-selling&filter.p.tag=L&filter.v.availability=1
Because I can see when using Tag that if the filter is “In Stock” we still have “L” in the filter options but the result “L” is out of stock. This is because XXL results in L taken from XXL. In Dawn theme let’s hide variant when “out of stock”.
Write this code in product-variant-options.liquid
{% if option_disabled %} {% continue %} {% endif %}
With this trick your filter result will more relevant.
Hope this can help you.
1 Like
Wow.. this worked
thank you so much..