A task I had to accomplish was to itterate all categories, and disable the categories which had no products enabled, or had no products assigned to them (filtering down the category tree, thus an anchor category, that has children with no products was also to be set disabled, filter all the way up the tree.

Read More