Penelope Glamour Posted May 2, 2013 Share Posted May 2, 2013 Hi everybody. I've recently migrated from oscommerce to prestashop and I'm really glad with it, but there are some aspects that I already need to learn. The first one, how can I get a notification (best in the first page of back office) about new comments made on products or at least, a quicklink to the comments module? Sorry if this question has been resolved, but I got no results when I used the forum's search function. Thanks in advance 1 Link to comment Share on other sites More sharing options...
tomerg3 Posted May 2, 2013 Share Posted May 2, 2013 There is no built in way with the default module. You can either look for a more robust comments module, or modify the existing one, and add a mail() call in the function that saves the customer's comment Link to comment Share on other sites More sharing options...
vekia Posted May 2, 2013 Share Posted May 2, 2013 hello what prestashop version you use? you use default comments module? if so, it is easy to add mail() function to the code Link to comment Share on other sites More sharing options...
Penelope Glamour Posted May 2, 2013 Author Share Posted May 2, 2013 (edited) Ups! I forgot it! It's the 1.5.3.1 (because the last one didnt work properly in my site) and yes, it's the default module. I will try to add a mail() call thanks again! Edited May 2, 2013 by Penelope Glamour (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 2, 2013 Share Posted May 2, 2013 Ups! I forgot it! It's the 1.5.3.1 (because the last one didnt work properly in my site) and yes, it's the default module. I will try to add a mail() call thanks again! if you have got any question related to this case, feel free to write don't forget to let us know if this method works for you, or also if not Link to comment Share on other sites More sharing options...
Penelope Glamour Posted May 3, 2013 Author Share Posted May 3, 2013 Of course! But, some I've seen that I need more OO training, by the moment It's have to be enought with a quik link... so I've follow a "how to" about add quick link (it's was really simple ) and , well, it's works (but I'm still triying the mail() solution ) Link to comment Share on other sites More sharing options...
tom52 Posted May 13, 2013 Share Posted May 13, 2013 if you have got any question related to this case, feel free to write don't forget to let us know if this method works for you, or also if not Hello, Can you let me know how to add it and where? Thank you Tom Link to comment Share on other sites More sharing options...
BoKr Posted July 23, 2013 Share Posted July 23, 2013 I am in the row of wanna have it too users but dont know how to do it Can you please explain`? thanks you Link to comment Share on other sites More sharing options...
az1000 Posted July 23, 2013 Share Posted July 23, 2013 How to add mail function code? to where please anybody knows write here. Thanks in advance. Link to comment Share on other sites More sharing options...
availvirago Posted July 26, 2013 Share Posted July 26, 2013 I'm having the same issues as below, the only difference is that this is the 1st shopping cart I've ever used really. I've tried others but they were much too complicated for a novice as myself. I'm using version 1.5.4.1 Thanks in advance Hi everybody. I've recently migrated from oscommerce to prestashop and I'm really glad with it, but there are some aspects that I already need to learn. The first one, how can I get a notification (best in the first page of back office) about new comments made on products or at least, a quicklink to the comments module? Sorry if this question has been resolved, but I got no results when I used the forum's search function. Thanks in advance I am in the row of wanna have it too users but dont know how to do it Can you please explain`? thanks you How to add mail function code? to where please anybody knows write here. Thanks in advance. Link to comment Share on other sites More sharing options...
elektrojo Posted September 11, 2013 Share Posted September 11, 2013 how,what and where to do code ? Link to comment Share on other sites More sharing options...
theme_designer Posted September 12, 2013 Share Posted September 12, 2013 You can also install a 3rd-party module for comments, like Yotpo etc. That will notify you if you have a comment waiting for your moderate. Link to comment Share on other sites More sharing options...
waldemar [pl] Posted November 11, 2013 Share Posted November 11, 2013 Fix for PS 1.4.x.x First make in /productcomments folder /mails. In /mails make folder with Your_iso_language like (en, fr, pl) and here mail templates named new_comment.(txt, html). Now you must in file productcomments on line 542 after $comment->save(); paste $template = 'new_comment'; $subject = $this->l('New comment'); $mail_ma = 'HERE_YOU_EMAIL_ADDRESS'; $id_lang = (is_object($cookie) AND isset($cookie->id_lang)) ? (int)$cookie->id_lang : (int)Configuration::get('PS_LANG_DEFAULT'); $iso = Language::getIsoById((int)$id_lang); if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html')) Mail::Send($id_lang, $template, $subject, NULL, $mail_ma, NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); Link to comment Share on other sites More sharing options...
Paw Rasmussen Posted February 21, 2014 Share Posted February 21, 2014 hello what prestashop version you use? you use default comments module? if so, it is easy to add mail() function to the code Hei. Can i do that in the standart prestashop 1.5.6.2 ? And how to do it ? Link to comment Share on other sites More sharing options...
vekia Posted February 21, 2014 Share Posted February 21, 2014 you can use it in 1.5.6.2 and you have to modify module .php file to the function where comment is added to cart - just add mail function to send an email Link to comment Share on other sites More sharing options...
Paw Rasmussen Posted February 23, 2014 Share Posted February 23, 2014 (edited) you can use it in 1.5.6.2 and you have to modify module .php file to the function where comment is added to cart - just add mail function to send an email Hi I want to receive an email when customers comment on the products, but the folders productcomments folder / mails are empty. what do I do? is there any other way to do it? \Paw Edited February 23, 2014 by Paw Rasmussen (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 23, 2014 Share Posted February 23, 2014 if you dont't want you don't have to use productcomments/mail folder you can just use simple mail() function Link to comment Share on other sites More sharing options...
Paw Rasmussen Posted February 23, 2014 Share Posted February 23, 2014 if you dont't want you don't have to use productcomments/mail folder you can just use simple mail() function I can not find it anywhere and see where I can enable it? Link to comment Share on other sites More sharing options...
vekia Posted February 23, 2014 Share Posted February 23, 2014 you have to modify module main php file as i said above. in back office there is no option to "turn on" this feature. you can achieve it only with modifications of the module core, no other way exists. Link to comment Share on other sites More sharing options...
mandrin Posted March 19, 2014 Share Posted March 19, 2014 Hi there, Could you please list the files that need to be edited, which files they are and the mail call code that needs to be put in? Regards, Link to comment Share on other sites More sharing options...
vekia Posted March 20, 2014 Share Posted March 20, 2014 modules/productcomments/controllers/front/default.php add mail function somewhere after $comment->save(); Link to comment Share on other sites More sharing options...
mandrin Posted March 21, 2014 Share Posted March 21, 2014 (edited) Ahhhh alas... I am not a coder. I need to know the exact string and need to know exactly where to put that string. die(Tools::jsonEncode(array( 'result' => $result, 'errors' => $errors ))); } mail([email protected],newreview,newreviewpostedonwebsite) protected function ajaxProcessReportAbuse() { if (!Tools::isSubmit('id_product_comment')) die('0'); Like in the above example, I don't even know if my code string is correct... Thank you Vekia, I did try your sugestion, but unfortunately the send button then does not work and the review is not submitted. What I need is rather a simple thing. I need a registered client to be able to review my products. I need to be notified via email that a review had been posted and placed in the moderation queue. I then need to go accept that reviw show it will show on my site. It is utterly inconcievable that such a highly required feature in todays modern eshopping world, is so difficult to inplement. Very frustrating to say the least As I said, I am not a coder, and as you are no doubt frustrated by our ignorance of simple concepts you take for granted, the reverse applies in equal measure for us too I am just rather going to have to play with the Yotpo module... I hate having a third party having control of my reviews, but this seems to be the only way I am going to get all the functionality I need. Kind regards, Edited March 21, 2014 by mandrin (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 22, 2014 Share Posted March 22, 2014 it's because you use wrong code instead of mail([email protected],newreview,newreviewpostedonwebsite) use: mail("[email protected]","new review","new review posted on website") Link to comment Share on other sites More sharing options...
Yotpo Posted March 23, 2014 Share Posted March 23, 2014 You can also install a 3rd-party module for comments, like Yotpo etc. That will notify you if you have a comment waiting for your moderate. Thanks, theme_designer! Just wanted to point out to everyone here that Yotpo is free and will automatically e-mail you when you get a new product review! If you have any questions, feel free to reply here or check out our dedicated thread: http://www.prestashop.com/forums/topic/2173[spam-filter]free-module-product-reviews-dramatically-increase-your-reviews Link to comment Share on other sites More sharing options...
mandrin Posted March 24, 2014 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) 1 Link to comment Share on other sites More sharing options...
framarfre Posted March 6, 2016 Share Posted March 6, 2016 it's because you use wrong code instead of mail([email protected],newreview,newreviewpostedonwebsite) use: mail("[email protected]","new review","new review posted on website") This code is fantastic, it also works on PrestaShop 1.6.1.4 and it helps me feel less the lack of yotpo (removed because it weighed too much on page load). 2 things should be implemented to make it perfect: 1) In the email that comes, indicate the product where the comment was added. 2) Some anti-spam function. Is there someone who can be able to do this? If it did I would be immensely grateful Link to comment Share on other sites More sharing options...
roolz Posted September 17, 2016 Share Posted September 17, 2016 (edited) Its perfect! But if i want to sent this email notification, to the others costumers that also add a comment? Its possible? Edited September 17, 2016 by roolz (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now