mandrin Posted March 20, 2014 Share Posted March 20, 2014 (edited) Hi there, I would like to receive an email notification when a client has made a review/posted a comment for a particular product. I know that the module I need to edit is the built in module: Product Comments. I know that the location of the modue is: yoursite/modules/productcomments And I know I need to add a mail call function to one of the files there. I have seen people say that the "productcomments.php" files needs to be edited. This is where I get stuck... Could someone please clearly define the mail call function and please exactly show where it must be put, in the relevant file. Edited March 24, 2014 by mandrin (see edit history) Link to comment Share on other sites More sharing options...
mandrin Posted March 21, 2014 Author Share Posted March 21, 2014 Any solutions? A lot of people have been asking how to do this. Link to comment Share on other sites More sharing options...
vekia Posted March 21, 2014 Share Posted March 21, 2014 http://www.prestashop.com/forums/topic/244193-how-can-i-have-notifications-about-new-comments-made-on-products/page-2 check my last post Link to comment Share on other sites More sharing options...
mandrin Posted March 21, 2014 Author Share Posted March 21, 2014 Thank you for your assistance I did reply, but unfortunately, I am not a coder and don't know the exact syntax and exact location to put the string. I have not been lazy and googled the hell out of this But what is basic for coders is not for a non-coder. My further reply is in the link you posted above. Kind regards, Link to comment Share on other sites More sharing options...
mandrin Posted March 24, 2014 Author Share Posted March 24, 2014 (edited) Sweeet! Got it figured out. Thanks Vekia! I am running PS 1.5.6 I edited the following file: mywebsite/modules/productcomments/controllers/front/default.php And I added the followin line: mail("[email protected]","new review","new review posted on website") After the first "$comment->save();" on line 110, like so: $comment->title = Tools::getValue('title'); $comment->grade = 0; $comment->validate = 0; $comment->save(); mail("[email protected]","new product review","new product review posted on website"); $grade_sum = 0; foreach(Tools::getValue('criterion') as $id_product_comment_criterion => $grade) { $grade_sum += $grade; $product_comment_criterion = new ProductCommentCriterion($id_product_comment_criterion); if ($product_comment_criterion->id) $product_comment_criterion->addGrade($comment->id, $grade); } It's there in the middle... Again, thanks for your help Vekia Edited March 24, 2014 by mandrin (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts