I was looking for a way to hide empty Categories and Sub-Categories in the $catmenu to avoid having the user click on a Category only for it to say "No products found". I ran across this contrib: http://addons.oscommerce.com/info/5475 and just "borrowed" the if-statement and it seems to work just fine. So here it is.

More...