I have a module that directly changes a product's price in the database. I would like for the catalog price rules, the various discounts on our site, to get applied to the product's price after I update the base price.

Saving the item, either in admin area or with a ->save() call sets the prices, but it takes far too long to save all the items we need. I want to just recalculate the discount prices without doing anything else.

I've tried various 're-indexing' methods, but I don't know if this is the issue. Nothing I've done seems to affect the product's price. Below is a overview of the attempts I've made that haven't born fruit:


This runs without error but doesn't seem to actually update the discounted prices on the front end.

        $product, 'catalog_product', Mage_Index_Model_Event::TYPE_SAVE

Again, this will run without error, but it won't change the price. I've tried changing catalog_product to catalog_product_price and TYPE_SAVE to TYPE_REINDEX all without success.

$event = Mage::getSingleton('index/indexer')->logEvent(

Once again, no errors, but also no price updates.

To be clear, the base price will show up immediately. It is only the actual price that is calculated with all of the catalog price rules that isn't updating.

Caching is disabled on my development system.

  • @Serpyre I'm willing to re-index the product. That is fine. I just can't ->save() the product. We have modules that observe the product save event and take several dozen seconds to do a product save. I just need to figure out how to reindex the product. Feb 25, 2014 at 0:11

2 Answers 2


It seems I've stumble upon the answer. To recalculate the 'final' price that gets calculated by applying all of the catalog price rules you need to run this:


One thing that gave me problems is that in messing around trying to figure this out I set a special price with the following:


Apparently a special price is higher priority than the price calculated by the price rules. As long as my special price was manually set I could not see that applyAllRulesToProduct was recalculating my prices correctly. I had to first:


And then I could adjust the price in the database, and run:


All of my sales prices for diferent stores and customer groups would get calculated. There is no need to reindex, the applyAllRulesToProduct function reindexes what is necessary.

Unfortunately, with the number of price rules in our store, that function is still slow. However, it is much faster than saving the whole item.


I´ve gotten the same problem and it was more easy then i thought. The "save and apply" button seems to work BUT in my case just the overview prices were shown correctly. Means: productinfo-page and checkout prices still were at the basic price. I need to

apply rules

manually -> worked for me.

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.