Jump to content

How can I have notifications about new comments made on products?


Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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

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

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 :rolleyes: ) and , well, it's works (but I'm still triying the mail() solution ;) )

Link to comment
Share on other sites

  • 2 weeks later...

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

  • 2 months later...

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

  • 1 month later...
  • 1 month later...

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

  • 3 months later...

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 by Paw Rasmussen (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

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 by mandrin (see edit history)
Link to comment
Share on other sites

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

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 by mandrin (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

 

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 :wub:

Link to comment
Share on other sites

  • 6 months later...

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