Quote Originally Posted by mc12345678 View Post
Well, I just realized that perhaps this may/may not work for you (ZC 1.3.9) but the following post showed how to do it for a ZC 1.5.4 site. It may still work for 1.3.9. The thread is full of various attempts to obtain the desired goal, but at least it's something.

https://www.zen-cart.com/showthread....47#post1265047

Don't think it will work since in our case the function

zen_count_products_in_category()

is looking for inactive products but not for products which are sold out (stock = 0) but still active.So IMHO one would first need to set a sold out product to inactive.