*/ class Mage_Catalog_Model_Index { /** * Rebuild indexes * * @return Mage_Catalog_Model_Index */ public function rebuild() { Mage::getResourceSingleton('catalog/category') ->refreshProductIndex(); foreach (Mage::app()->getStores() as $store) { Mage::getResourceSingleton('catalog/product') ->refreshEnabledIndex($store); } return $this; } }