コード例 #1
0
 /**
  * Additional validation when on a category page, so the sub category of the store root category is not added as filter.
  *
  * @param Mage_Catalog_Model_Category $category Category to be validated.
  *
  * @return bool
  */
 protected function _isValidCategory($category)
 {
     $rootId = (int) Mage::app()->getStore()->getRootCategoryId();
     if ($this->getUseUrlRewrites() && $category->getParentId() === $rootId) {
         return false;
     }
     return parent::_isValidCategory($category);
 }