view products in admin that have 0 in stock

Solved
Excursionist
25 0 5

Is there a way to list all products with 0 inventory? When I go to inventory and filter with stock = 0 it will show me variants, but I want to view only products where all variants are 0 stock, meaning that product is out of stock. 

 

My goal is to manually clean up my store to remove products that all its variants are out of stock so that I can unpublish them from my online store and thus reduce the amount of out of stock items showing up when customers search for products. I have yet to find a better way to prevent out of stock items from appearing in search, and all the paid apps seem to handle this by hiding the product. I want to do this myself but I cannot find a clean way to find products I can hide. The admin tool will tell me if 1 variant is 0 stock but I cannot find a view that will only show me products were all variants are out of stock. 

 

 

0 Likes

Success.

Shopify Partner
152 37 58

@dlevens

 

I recommend exporting your products to a csv file and filtering them so all the 0 in stock products are at the top. From there, you can see everything that is out of stock and start the clean up process. 

 

To export your products, go to Products > Export 

 

This makes it nice because you can unpublish those in bulk from the csv as well. That way you're not deleting product, you're just hiding them. 

 

Please let me know if you have any questions! 

 

Thanks, 

Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well :)
1 Like
Excursionist
25 0 5

Thank you ShayOwensby, never thought about that option, seems like that should do the trick as I only plan on doing it a few times a year. Quick followup, if I unpublish products, and google spiders or some person visits those old urls, I assume it will display a 404? Pretty much the same as if I deleted the products instead of unpublishing them?

 

Never really figured out if this is bad or not. We sell fabric so we rarely if ever restock the same print, it is tons of bolts of 15 yards that once we sell it, we move on to the new prints. So we have a lot of products which go out of stock that google still indexes. 

 

Since all of our product views are pretty much collections I already have them all set to only show products that are greater than 0 inventory, so the out of stock only shows up in searches. I looked into tweaking the code to hide out of stock from search but it seems this causes more mess as you create blanks in pages, so a page which should be showing 20 products may only show 10 if you had 10 out of stock items. Surely there has to be some smarter way to code a search so that it still shows 20 products, similar to if I had just unplublished the items.  

0 Likes
Highlighted
Shopify Partner
152 37 58

Yes, it will display a 404 error. It'd be a little bit of work but you could also edit your robots.txt file with Google each month so those out of stock products aren't being indexed. 

Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well :)
0 Likes