Inheritance: extends Mage_Core_Helper_Abstract
コード例 #1
0
 /**
  * Rebuild index for the specified products
  *
  * @param null|int       $storeId
  * @param null|int|array $productIds
  * @return Algolia_Algoliasearch_Model_Resource_Fulltext
  */
 public function rebuildProductIndex($storeId = NULL, $productIds = NULL)
 {
     if ($this->_helper->isEnabled($storeId) && is_object($this->_engine) && is_callable(array($this->_engine, 'rebuildProductIndex'))) {
         $this->_engine->rebuildProductIndex($storeId, $productIds);
     }
     return $this;
 }
コード例 #2
0
 /**
  * Define if engine is available
  *
  * @return bool
  */
 public function test()
 {
     if (!$this->_helper->isEnabled()) {
         return parent::test();
     }
     return $this->_helper->getApplicationID() && $this->_helper->getAPIKey() && $this->_helper->getSearchOnlyAPIKey();
 }
コード例 #3
0
 /**
  * Retrieve root category id
  *
  * @return int
  */
 public function getRootCategoryId()
 {
     if (-1 === self::$_rootCategoryId) {
         $collection = Mage::getResourceModel('catalog/category_collection');
         $collection->addFieldToFilter('parent_id', 0);
         $collection->getSelect()->limit(1);
         $rootCategory = $collection->getFirstItem();
         self::$_rootCategoryId = $rootCategory->getId();
     }
     return self::$_rootCategoryId;
 }
コード例 #4
0
 public function moveProductsTmpIndex(Varien_Object $event)
 {
     $storeId = $event->getStoreId();
     $this->helper->moveProductsIndex($storeId);
 }