Magento reindex price product

0

When you save a product in Magento’s backend admin console application, the system will reindex the price information for that product.
But when you use $product->save() then that product will don’t update immediately to frontend, concrete is in list in search result

Magento reindex price product
To resolve this issue, you only need running this code after save() function:

//index for change product
$resourceIndexPrice = new Mage_Catalog_Model_Resource_Product_Indexer_Price;
$resourceIndexPrice->reindexProductIds($productId);

After, reload and get result

Thanks for whatching!

About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Comments are closed.

%d bloggers like this: