1

When you save a product in Magento's backend admin console application, the system will reindex the price information for that product.

Where in the core code does this "single save" product price reindex kick-off and happen? Is it the same code path at the main price re-indexer? Or is it somewhere else?

2
  • What version? In CE < 1.4 lots of reindexes were triggered by observer events from CatalogIndex.
    – philwinkle
    Apr 24, 2014 at 16:58
  • @philwinkle Specifically 1.6.1, but interested in answers from all versions (for the Googles) Apr 24, 2014 at 17:06

2 Answers 2

2

I'm using Magento 1.7 and the class "Mage_Catalog_Model_Product_Indexer_Price" in the function _registerCatalogProductSaveEvent I see where the single product id is set to be reindexed.

The class "Mage_Catalog_Model_Resource_Product_Indexer_Price" has a catalogProductSave function. Here it says it is "Processing the product save." However I'm not sure if this is exactly what you are looking for as these are all directly dealing with the events to reindex the product.

2
  • +1 for useful information, but that doesn't appear to do the actual saving — its just registering an event with information the index processor will use. Apr 24, 2014 at 17:15
  • I have updated my original answer to have a bit more detail, and added a separate function, but it is still dealing with the events for reindexing price.
    – Dazari
    Apr 24, 2014 at 17:40
1

I found the specific method I was looking for in Magento 1.6. It is

#File: app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php
function reindexProductIds()
{
    //...
}

If you've changed the price during a product save, this is the method that's ultimately called.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.