public function rebuildCategoryIndex(Varien_Object $event) { $storeId = $event->getStoreId(); $categoryIds = $event->getCategoryIds(); $page = $event->getPage(); $pageSize = $event->getPageSize(); if (is_null($storeId) && !empty($categoryIds)) { foreach (Mage::app()->getStores() as $storeId => $store) { if (!$store->getIsActive()) { continue; } $this->helper->rebuildStoreCategoryIndex($storeId, $categoryIds); } } else { if (!empty($page) && !empty($pageSize)) { $this->helper->rebuildStoreCategoryIndexPage($storeId, $this->category_helper->getCategoryCollectionQuery($storeId, $categoryIds), $page, $pageSize); } else { $this->helper->rebuildStoreCategoryIndex($storeId, $categoryIds); } } return $this; }