Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

E-mail notification when new product reviews are submitted

Featured Replies

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?

  • Author

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

  • 2 months later...

@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 Yourisolanguage 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 = 'newcomment'; $subject = $this->l('New comment'); $mailma = 'HEREYOUEMAILADDRESS'; $idlang = (isobject($cookie) AND isset($cookie->idlang)) ? (int)$cookie->idlang : (int)Configuration::get('PSLANGDEFAULT'); $iso = Language::getIsoById((int)$idlang);

            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("[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);
            }

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

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.