public function stopEmulation($info) { $this->logger->start('STOP EMULATION'); $appEmulation = Mage::getSingleton('core/app_emulation'); Mage::app()->setCurrentStore($info->getInitialStoreId()); Mage::app()->getStore($info->getEmulatedStoreId())->setConfig(Mage_Catalog_Helper_Product_Flat::XML_PATH_USE_PRODUCT_FLAT, $info->getUseProductFlat()); Mage::app()->getStore($info->getEmulatedStoreId())->setConfig(Mage_Catalog_Helper_Category_Flat::XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY, $info->getUseCategoryFlat()); $appEmulation->stopEnvironmentEmulation($info); $this->logger->stop('STOP EMULATION'); }
/** * Rebuild all index data */ public function reindexAll() { if (!$this->config->getApplicationID() || !$this->config->getAPIKey() || !$this->config->getSearchOnlyAPIKey()) { Mage::getSingleton('adminhtml/session')->addError('Algolia reindexing failed: You need to configure your Algolia credentials in System > Configuration > Algolia Search.'); $this->logger->log('ERROR Credentials not configured correctly'); return; } $this->logger->start('PRODUCTS FULL REINDEX'); $this->engine->rebuildProducts(); $this->logger->stop('PRODUCTS FULL REINDEX'); return $this; }