I have to set the product price to a custom value depends up on the customer. So I have written an event catalog_product_get_final_price
and in the observer I have set the custom price for the product. But this is working only for "Simple Product" (visibility both). When I view the configurable product nothing is happened. Even I have write a die()
in the observer and it is working when I view the Simple product but not for the configurable product. That means when I view the configurable product, the event is not triggering.
How can I set the simple product's price to a custom value using event? I need this for the "listing" and "view page"
Best Answer
First, you should tried your event on a default magento Instance.
If it will work then there might be some other module that have overridden final price using
plugin
, orevent
.if it won't work on default magento then there
probanly are some issues in your observer code.
Observer.code should like this: