Jump to content
thirty bees forum

Recommended Posts

Posted

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?

  • 2 months later...
Posted

@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?

Posted

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

Posted

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'].

Posted

@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 :)

Posted

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...