Magento API: Rebuild Indexes after adding new products

前端 未结 2 1122
执念已碎
执念已碎 2020-12-07 15:57

I am currently writing a script that lets me import multiple products in magento.

$product = Mage::getModel(\'catalog/product\');
$product->setSku($data[         


        
2条回答
  •  轮回少年
    2020-12-07 16:39

    There are at least two circumstances that prevent indexer to reindex a product on save.

    One: the "Manual update" setting in the Indexes properties you find under System, Index Management. You should set it to "Update on Save" if you want a product to be indexed upon a save.

    Two: the setIsMassupdate product flag that is used, for example, in DataFlow batch import procedures in order to prevent indexer to be triggered upon each product save method call.

    Hope this helps. Regards, Alessandro

提交回复
热议问题