how to refresh magento tier price cache after sql insert

三世轮回 提交于 2019-12-04 18:31:55

I wonder if trying something like this will help?

$productsForCatalogIndexUpdate = array(123,1231); //Add your product ids here
if (count($productsForCatalogIndexUpdate)) {
  Mage::log("About to update the catalog price index on the following products " . join(', ', $productsForCatalogIndexUpdate));
  Mage::getModel('catalogindex/indexer')->plainReindex(
    $productsForCatalogIndexUpdate,
    Mage_CatalogIndex_Model_Indexer::REINDEX_TYPE_PRICE
  );
  Mage::getModel("catalogindex/observer")->clearPriceAggregation();
}

If I remember correctly it rebuilds the price index tables for the specified prices.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!