Hi,
How can we send email to customer as soon as they file a returns request. I just want to send a standard courtesy email saying that we will be in touch with you shortly. I know that an email will be sent once we update the status, but I want to send an email straight away, automatically.
I have found a thread where an email is being sent to admin when a request is raised, but nothing to send to the customer here. http://forum.opencart.com/viewtopic.php ... 88#p181143.
Thanks.
FM.
How can we send email to customer as soon as they file a returns request. I just want to send a standard courtesy email saying that we will be in touch with you shortly. I know that an email will be sent once we update the status, but I want to send an email straight away, automatically.
I have found a thread where an email is being sent to admin when a request is raised, but nothing to send to the customer here. http://forum.opencart.com/viewtopic.php ... 88#p181143.
Thanks.
FM.
Last edited by fairmount on Sat May 26, 2012 2:23 pm, edited 1 time in total.
I made amendments for you. Just add this exactly where it said to add it on that other thread.:
Code: Select all
//Start admin email
$message ="<strong>You have a product return waiting.</strong><br><br>"
.'<a href="http://YOURWEBSITE.COM/ADMIN">Login to review</a>';
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($this->config->get('config_email'));
$mail->setFrom("YOUREMAIL@mail.com");
$mail->setSender("SENDER NAME HERE");
$mail->setSubject("A Return Has Been Requested");
$mail->setHtml($message);
$mail->send();
//End admin email
//Start customer email
$message_customer ="Your return has been submitted and is awaiting approval. Thanks!";
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($this->request->post['email']);
$mail->setFrom("YOUREMAIL@mail.com");
$mail->setSender("SENDER NAME HERE");
$mail->setSubject("A Return Has Been Requested");
$mail->setHtml($message_customer);
$mail->send();
//End Customer email
Hello Avvici,avvici wrote:I made amendments for you. Just add this exactly where it said to add it on that other thread.:
Does this work with OC v1.5.1.3?
I have tried to install this through vQmod but I am receiving this error:
Notice: Undefined index: email in /home/xxx/public_html/vqmod/vqcache/vq2-catalog_controller_account_return.php on line 355Notice: Error: E-Mail to required! in /home/xxx/public_html/system/library/mail.php on line 58
I believe I modified the code correctly. I have inserted our e-mail address in both instances of the setFrom field and also our store name in both instances of the setSender field. Is this correct?
Who is online
Users browsing this forum: Bing [Bot] and 73 guests