E-mail notification when new product reviews are submitted



  • In the product comments module you have the ability to activate validation of all reviews. Unfortunately there doesn’t seem to be any way to get an e-mail notification when a new review is awaiting approval.

    Any suggestions on how to solve this issue?



  • Add email notifications.

    We want to improve the module soon. Could you open additional issues like #12 for the email types and notifications you would like to see? We will have a look and try to add them to the new release.



  • Sounds great with an updated version of the module!
    I’ve added the email notifications as a feature request on github.



  • Thanks. That’s some good feedback. We’ll try to add all the notification types 🙂



  • @mdekker I was told someone made a comment on one of my products but I can’t find the comment to approve it and I didn’t get any email and there isn’t any notification at the top of my dashboard either. How can I find it?



  • Just click on configure your “product comments” module in modules section.



  • @MockoB I went to configure it and it was already configured, but at least I saw the comment awaiting approval. I guess I’ll have to check the product comments module from time to time, until I figure out how to have it show up in the admin dashboard or in email. (smile: hinting in case there’s something else I should do).



  • When you figure it out please share it with the community 😉



  • You mean that no one gets notifications? If I figure it out of course I’ll post it.



  • If you can write code, you could use the actionObjectProductCommentAddAfter hook, which should trigger after adding a new product comment. The just added comment is passed to the hook as $params[‘object’].



  • @alwayspaws that’s exactly what I mean. You may do what @gonssal said or wait like most merchants, someone who understands the above line, to implement the notifications in the core 🙂



  • @gonssal I don’t know where to find that hook and I’m not actually a hooker … I mean coder. lol.

    @MockoB - I have done some investigating but haven’t implemented any of the below yet, but I have high hopes:

    Some of this info dates back to 2013 and PS 1.5 but may somehow work:

    https://www.prestashop.com/forums/topic/244193-how-can-i-have-notifications-about-new-comments-made-on-products/

    Modify the existing products comments module and add a mail() call in the function that saves the customer’s comment:

    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).

    in file productcomments on line 542 (or whatever) after:

    find $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/');
    

    end of that posted code

    Tech support from Vekia in that same forum post:

    Vekia: you have to modify module .php file

    to the function where comment is added to cart - just add mail function to send an email.

    Someone asked him to clarify and his reply was:

    Files that need to be edited, which files they are and the mail call code that needs to be put in:

    modules/productcomments/controllers/front/default.php

    add mail function somewhere after:
    $comment->save();

    =====================

    A different user worked out the code for PS 1.5.6

    I edited the following file: mywebsite/modules/productcomments/controllers/front/default.php

    And I added the following line: mail("newreview@mymail.com",“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("newreview@mymail.com",“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);
    			}
    

    ============================

    News for users of the PS 1.7 version (if any are here) Free product reviews module for new PrestaShop 1.7.x productcomments.zip by Vekia:

    This addon is a modification of old ‘productcomments’ module that we have by default in each installation of prestashop 1.6.x / 1.5.x. Now it fully supports new releases of PS 1.7.x. Module has exactly the same features as previous versions with improved design.

    Download from forum:

    https://www.prestashop.com/forums/topic/609811-free-module-product-reviews-comments-for-prestashop-17/?_fromLogin=1

    Another user’s observation and fix for that addon:

    If the popup stays on screen the user said: It was the usual “wrong folder and file permissions” on Prestashop. Changed everything to 755/644 and now it’s working.

    So, I’m not sure I’m up to this task, but I may try … tomorrow. Today is shot.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.