Jump to content
salko

[Solved] Email message every time when customer write a message to me

Recommended Posts

Everytime I post a message to the customer in BO the customer gets email with this message (which is also available in FO if they are logged in) so they are instantly informed about new message. But everytime when customer post a replay or new message for customer suport etc. I as a store owner don't receive any email informing me that new message was posted. So I must go manually into BO (Employees>Customer support or. Orders>Customer massages, etc.) to see if someone is maybe posted a message/question/inquiry for me ... Now I'm wondering, how to make Prestashop to inform me through email when someone post e new message/question/inquiry ... ?? Thank you!

Share this post


Link to post
Share on other sites

Still no one has a solution for this?? I have PS 1.4.0.17, please help!

Share this post


Link to post
Share on other sites

I just checked the code, if user send a message from order history/order detail page.
PrestaShop does send out email to store owner email address.
So if your store configure connectly, you should be to receive email.

Here is code

                    $message->id_order = (int)($idOrder);
                   $message->private = false;
                   $message->add();
                   if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE'))
                       $to = strval(Configuration::get('PS_SHOP_EMAIL'));
                   else
                   {
                       $to = new Contact((int)(Configuration::get('PS_MAIL_EMAIL_MESSAGE')));
                       $to = strval($to->email);
                   }
                   $toName = strval(Configuration::get('PS_SHOP_NAME'));
                   $customer = new Customer((int)(self::$cookie->id_customer));
                   if (Validate::isLoadedObject($customer))
                       Mail::Send((int)(self::$cookie->id_lang), 'order_customer_comment', Mail::l('Message from a customer'),




Also, id user send message though contact form, you should also be able to receive a email.

Share this post


Link to post
Share on other sites

In which PS files must I look for this code? I do not get any email when I have test it, can someone else write something in contact form for test? Site link is in my signature ...

Share this post


Link to post
Share on other sites

for message send from order history/order detail page, you can look into following file

/YourSiteRoot/controllers/OrderDetail.php

Share this post


Link to post
Share on other sites

I have checked this OrderDetailController.php file and I could not find any differences from code you posted. I attached this file, can you check it if you will see some problems with it. Because I receive other emails from shop (new order, order confirmation emails, etc.) I persume I have store configured correctly .... Thanks for help!

OrderDetailController.php

Share this post


Link to post
Share on other sites

it is difficult to find problem in the code. because you don't know where is the problem, maybe not in code.

I have added some lines to output something information on screen when you send message from order history.
it will display which email address is sent,
it will display is the email is sent or not.

Please use attached file to replace yours (PLEASE make backup of your before doing this)
and make test message, see what will be displayed.

don't forget to restore the file after test.

OrderDetailController.php

Share this post


Link to post
Share on other sites

Omg, I'm such a troll ... I had a wrong email in contacts section so now everything makes sense and works now :)) Thank you very much shokinro, it would take a much longer to figure this out without your help (especially your last post) ... ;-)

Share this post


Link to post
Share on other sites

you are welcome salko. it is my pleasure.
When you got a chance, please also visit my blog and my website, maybe you will find something you are interested.
Any comments or advice are welcome. The links are at my signature.

Share this post


Link to post
Share on other sites

in order-detail......... when customers send comments its not showing any message or any hint that message has been sent............ how to display that type of message in front office........ kindly tell an idea

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More