One of the constant complaints we get from our buyers is that a sizeable part of our collections get sold out on the launch day. So I am looking to incorporate a SOLD OUT Filter on top of the collection page. I will be very grateful if some one can help me out with the liquid code for this.
Thanks in Advance.
Victoria here from the Guru team!
That is completely do-able! There are a few ways of setting this up. The easiest way to set this up would not require a liquid code customization. You can create an automatic collection for when the inventory of a product is 0. This collection will be hidden and therefore, your sold out products will not appear on your page. We have a great tutorial on how to hide these sold out products.
You can find the link here: https://docs.shopify.com/support/your-store/products/can-i-hide-products-when-they-are-out-of-stock
The next option would be through the use of apps. An app like Zero Out will automatically hide these sold out products for you.
Have a look at the first tutorial and let us know if you need any more guidance,
Victoria - Shopify Guru
Thank you for the pointers..
But I am specifically looking for a pull down filter option for our visitors, if they want to browse only the 'available' items..
We don't want to hide the "Sold out" products altogether.. For our store, the sold out tags on the products are at times the purchase trigger for many visitors.
Hope I have explained that clearly.. Pls help..
Okay I understand :) If you want to display your sold out variants you could always create an entire collection for your sold out products and display these for marketing. You can set the conditions of the collection to read:
This would allow you to have a visible collection of sold out products but have them be able to click on a new collection of available products to filter these out. To create a filter on your page specifically for inventory would be a lot of custom work. It may be best to reach out to a Shopify Expert for this type of customization.
Alternately, you could tag your sold out products and filter by product tag or look into using a filter app such as Power Tools. This app can be found here: https://apps.shopify.com/shopify-power-tools-suite
Hope that helps :)
This doesn't actually work. Shopify's "0 inventory" filter is stupid and will show any product that has ANY variant with 0 on hand. So you could have 1000 in stock of one variant and 0 of another and it will show on your out of stock collection.
Travnape is right, the simple conditional logic in shopify collection building section, though powerful, does not work for larger stores.
Besides the downfall of variants & the logic as mentioned earlier, there also needs to be nested "any" / "all" logic that allows for more specific auto-collections. Otherwise it's a manual data entry mess of tags and imagine doing that for 5000+ products.