Page 2 of 2

Re: Order Return Email Notification Not Working

Posted: Mon Jul 13, 2020 6:08 pm
by paulfeakins
vaidyamanishjoshi wrote:
Wed Jul 11, 2018 7:39 pm
What can be solution for this ?
It could be that your web host is blocking them based on the content of them.

So ask your web host about this!

Re: Order Return Email Notification Not Working

Posted: Thu Aug 13, 2020 8:18 am
by fegdeed
what theme are you using?

Re: Order Return Email Notification Not Working

Posted: Thu Jan 07, 2021 12:09 am
by head_dunce
Ugh, just noticed I have some returns in the system and I was never notified of them. Looks like I have a project to work on now.

Re: Order Return Email Notification Not Working

Posted: Thu Jan 07, 2021 12:25 am
by straightlight
head_dunce wrote:
Thu Jan 07, 2021 12:09 am
Ugh, just noticed I have some returns in the system and I was never notified of them. Looks like I have a project to work on now.
Ensure your events are turned on from your admin > extensions > events page. It is also possible you may encounter issues with returns before the master branch as I have already reported the issue to Daniel last year.

Re: Order Return Email Notification Not Working

Posted: Fri Mar 19, 2021 7:46 pm
by mauprik
In the past we had issue's with the mails for the orders. I seem to remember there was a problem with setText and setHtml. In file "catalog/controller/mail/order.php" it is writen ike:

$mail->setTo($order_info['email']);
$mail->setFrom($from);
$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode(sprintf($language->get('text_subject'), $order_info['store_name'], $order_info['order_id']), ENT_QUOTES, 'UTF-8'));
$mail->setHtml($this->load->view('mail/order_add', $data));
$mail->send();

In file "admin/controller/mail/return.php" it's written like:

$mail->setTo($return_info['email']);
$mail->setFrom($store_email);
$mail->setSender(html_entity_decode($store_name, ENT_QUOTES, 'UTF-8'));
$mail->setSubject(sprintf($language->get('text_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $return_id));
$mail->setText($this->load->view('mail/return', $data));
$mail->send();

My order mails are working correct and the return mail doesn't work. Is it possible that the error comes from the setText and setHtml difference? And if this is the solution, which file have to be updated to handle all of the return procedure properly? (I havo no time and possibilities to test this, but I'am looking for the solution)

Re: Order Return Email Notification Not Working

Posted: Fri Mar 19, 2021 7:52 pm
by xxvirusxx
Admin never get return e-mail when customer complete return form.
You need to check Returns from admin from time to time.

For client notification you need to apply event bug fix
https://github.com/opencart/opencart/is ... -335694104

Re: Order Return Email Notification Not Working

Posted: Fri Mar 19, 2021 10:35 pm
by mikeinterserv
mauprik wrote:
Fri Mar 19, 2021 7:46 pm
In file "admin/controller/mail/return.php" it's written like:

{code] $mail->setTo($return_info['email']);
$mail->setFrom($store_email);
$mail->setSender(html_entity_decode($store_name, ENT_QUOTES, 'UTF-8'));
$mail->setSubject(sprintf($language->get('text_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $return_id));
$mail->setText($this->load->view('mail/return', $data));
$mail->send();[/code]
So just add this to $mail setTo

Code: Select all

$mail->setTo($return_info['email'].','.$this->config->get('config_email'));
or

Code: Select all

$mail->setTo($return_info['email'].','.($store_email));
I think both would work to send the return email to store address
You don't need to mess about with anything else really