Algolia_Algoliasearch_Helper_Data::removeCategories PHP Метод

removeCategories() публичный Метод

public removeCategories ( $ids, $store_id = null )
    public function removeCategories($ids, $store_id = null)
    {
        $store_ids = Algolia_Algoliasearch_Helper_Entity_Helper::getStores($store_id);
        foreach ($store_ids as $store_id) {
            if ($this->config->isEnabledBackend($store_id) === false) {
                $this->logger->log('INDEXING IS DISABLED FOR ' . $this->logger->getStoreName($store_id));
                continue;
            }
            $index_name = $this->category_helper->getIndexName($store_id);
            $this->algolia_helper->deleteObjects($ids, $index_name);
        }
    }

Usage Example

Пример #1
0
 public function removeCategories(Varien_Object $event)
 {
     $storeId = $event->getStoreId();
     $category_ids = $event->getCategoryIds();
     $this->helper->removeCategories($category_ids, $storeId);
 }