Example #1
0
 /**
  * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection $collection
  * @return RicoNeitzel_VertNav_Block_Navigation
  * @deprecated Now the count is added directly in _getCategoryChildren()
  * @see        _getCategoryChildren()
  */
 protected function _addProductCount($collection)
 {
     if ($collection instanceof Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection) {
         if ($collection->isLoaded()) {
             $collection->loadProductCount($collection->getItems());
         } else {
             $collection->setLoadProductCount(true);
         }
     } else {
         $this->_getProductCollectionResource()->addCountToCategories($collection);
     }
     return $this;
 }