Question

This is a high level question but if your a magento devloper it shouldnt be complicated to answer.

I am rewriting magentos Catalog Price Rules. I rewrote the table catalogrule and now successfully can add new price rules to the table. But Now I would like to know what observer or model actually evaluates those rules and sets the final price that will be eventually displayed in the catalog.

thanks

Was it helpful?

Solution

The catalog price rules are not evaluated on-the-fly, but the resulting prices are calculated and stored in the database when the rules are "Saved and applied" (in the Catalog price rules admin area).

To get your price calculated you can bind a custom function of your module to the event catalog_product_get_final_price that is dispatched just after Magento evaluates all previous default rules/discounts/etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top