2017-03-16 3 views
1

Wie so Index von einzelnen Produkt? Ich habe unten Code versucht, aber es funktioniert nicht.Wie man einzelne Produkte programmatisch neu indiziert?

Mage::getSingleton('index/indexer')->processEntityAction($product, Mage_Catalog_Model_Product::ENTITY, Mage_Index_Model_Event::TYPE_SAVE)

gibt es eine andere Lösung?

Antwort

0

Sie können wie diese durch ihre Attribut Produkt Indizierung tun:

$indexer = Mage::getSingleton('index/indexer')->processEntityAction($_product, 'catalog_url', Mage_Index_Model_Event::TYPE_SAVE); 

Hoffnung, es funktioniert für Sie.

+0

ja, es funktioniert für mich. Danke. :) @sohil – Parth

0
$process = Mage::getSingleton('index/indexer')->getProcessByCode("cataloginventory_stock"); 
$process->reindexAll(); 

Try Verwendung dieses Codes je benötigen Sie:

catalog_product_attribute  Product Attributes 
catalog_product_price   Product Prices 
catalog_url     Catalog Url Rewrites 
catalog_product_flat   Product Flat Data 
catalog_category_flat   Category Flat Data 
catalog_category_product  Category Product 
catalogsearch_fulltext  Catalog Search Index 
cataloginventory_stock  Stock status 
+0

danke. Ich wollte nur Produkt reindex. aber es ist schön, danke. – Parth

Verwandte Themen