Magento: What Model Or Observer Actually Sets the Final Price based on Catalog Price Rules

StackOverflow https://stackoverflow.com/questions/21914816

  •  14-10-2022
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top