I am trying to re-index product prices after update in my product price but its not working showing me old price in product list page.I am using this code
$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_product_price');
$process->reindexAll();
i also tried this one
$reindex = Mage::getModel('index/process')->load(2);
$reindex ->reindexAll();
But its not working. I have tried from by this command
php indexer.php --reindex catalog_product_price
Its working fine showing me updated prices.
$reindex
contain? Are you sure it is loaded?$reindex
is a loaded object or not. Try echoingecho $reindex->getStatus()
and see it if works.$reindex->reindexEverything()
?