/** * Load collection * * @param bool $printQuery * @param bool $logQuery * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */ public function load($printQuery = false, $logQuery = false) { if ($this->isLoaded()) { return $this; } if ($this->_loadWithProductCount) { $this->addAttributeToSelect('all_children'); $this->addAttributeToSelect('is_anchor'); } parent::load($printQuery, $logQuery); if ($this->_loadWithProductCount) { $this->_loadProductCount(); } return $this; }