I’ve been trying to find a more automated and efficient way to hide out of stock products from my shop.
I have multiple automatic collections and I’ve tried to add the condition - Inventory stock is greater than 0, so that the collections will only show in-stock products.
However, I also pre-sell a lot of products which will be “out of stock” but “continued to sell without stock”, so the method mentioned above will also hide these pre-order products from the collections which is not desired…
I have a huge SKU list and under the product module of Shopify you can’t sort products by stock number which is really not convenient and on the other hand, the inventory module does not allow you to control the availability of the products…
You can use our application to hide out-of-stock products automatically. It doesn’t hide the “continued to sell without stock” products as you expected. It also unhides the products that were hidden when they are in stock.
If you add the words “pre-order” in the title or description of the pre-order products, you can make an additional condition - “does not contain” the words “pre-order”.
The app is pretty simple and moves all out-of-stock products to the end of the collection in real-time. Whenever some product is back in stock, it’s returned to its original position in few seconds.
We also have a dedicated setting to sort the pre-order products or not.
I was not satisfied by any of the answers in the community so I put this post together showing how to modify the template code to order by stock. I think this should be built into Shopify.
NOTE: you can use this same code to suppress the out of stock items as well
This “human idea” seems like common sense: “Push out of stock items to the bottom”
However, after trying to make this happen I do indeed see why Shopify has ignored this… with enough community support we could help bring this feature to Shopify’s attention, and with the right DEV team on their end a good solution could be reached by enhancing the Shopify core code and collection array. (further details in link above)