Hi I am new to Magento
How to add custom functionality to Product review ??
I need to send a mail with discount coupons to user's email id once user has reviewed product.
How can I do this functionality please help me
You can add an observer to the
review_save_after event in your
config.xml file like this:
<events> <review_save_after> <observers> <namespace_module> <class>Namespace_Module_Model_Review_Observer</class> <method>send_mail_after_review</method> </namespace_module> </observers> <review_save_after> </events>
Note: you will need to customize the above code and create your observer class to meet your needs. For more information on Magento observers see this link.
Alternatively, you may be able to extend the product controller class in
Then add your mail function after the line that looks like:
$session->addSuccess($this->__('Your review has been accepted for moderation.'));
There is some useful information here pertaining to overriding Magento observers.