Page 1 of 2
Return Requests: notification email not being sent to admin
Posted: Sun Apr 01, 2012 4:58 am
by DragonJ
When a customer fills out a return request form, is there supposed to be a notification that gets emailed to the admin?
I get an email notification every time someone places an order, but it's just as important to get a notification when somebody wants to return something and this isn't happening.

Re: Return Requests: notification email not being sent to ad
Posted: Sun Apr 01, 2012 1:03 pm
by Avvici
Only to customer. You will be able to see the RMA request in the returns section. If you want an email to go to admin, you can either CC to your email address, or set up a private function to send out an email with different parameters.
Re: Return Requests: notification email not being sent to ad
Posted: Mon Apr 02, 2012 3:13 am
by DragonJ
avvici wrote:Only to customer. You will be able to see the RMA request in the returns section.
That's the problem. I'm already managing enough things that it's become a burden to remember checking the RMA requests in the admin each day. Life would be easier if I was sent an email notification because I never forget to check email.
avvici wrote: If you want an email to go to admin, you can either CC to your email address, or set up a private function to send out an email with different parameters.
A little help with this would be appreciated.

Re: Return Requests: notification email not being sent to ad
Posted: Mon Apr 02, 2012 5:04 am
by straightlight
The best solution would be to create a cron job so that you don't have to deal with all the emails additionally with the tasks you already have to take care of from the admin. This is what most businesses do; to split the tasks without the overkill so that on an every constant time period, the emails gets received when involved.

Re: Return Requests: notification email not being sent to ad
Posted: Mon Apr 02, 2012 5:29 am
by DragonJ
straightlight wrote:The best solution would be to create a cron job...
Let's pretend that you've been asked to give explicit step-by-step instructions to a 103-year-old lady who is very alert, but only touched a computer for the first time in her life yesterday. The good news is this 103-year-old lady does know what cron jobs are. The bad news is the mere instruction of "create a cron job" is very vague. What script is cron supposed to run? From where do we get this script?
Re: Return Requests: notification email not being sent to ad
Posted: Mon Apr 02, 2012 5:35 am
by straightlight
Sorry. Didn't meant to explain to a 103-year old lady. My previous reply above was simply theoretically explained. I guess this what happens when you get too much surrounded by theory lessons. Cron jobs has the purposes to run automated tasks when scripted from your scope, assuming from your cPanel / Plesk console. Countless hosting providers now provides availability to their users by setting a chronology (cron) job in order to operate singled or constant jobs. In your case, this would be useful since you won't have further tasks on your hands once the cron job established. It will simply bring you the email message automatically and when needed.
Re: Return Requests: notification email not being sent to ad
Posted: Fri Apr 13, 2012 8:01 pm
by Mathias S
In which file can I find the email command that sends the email to the customer (where I can add my own email address as CC)? My customers don't even get that email right now unfortunately, but I can't find any error in the vqmod log file or regular log file.
Thanks.
Re: Return Requests: notification email not being sent to ad
Posted: Fri Apr 13, 2012 8:33 pm
by straightlight
Have you checked the mail / web logs from your cPanel console ?
Re: Return Requests: notification email not being sent to ad
Posted: Fri Apr 13, 2012 8:40 pm
by Mathias S
Whats a cPanel console?
Re: Return Requests: notification email not being sent to ad
Posted: Fri Apr 13, 2012 9:36 pm
by straightlight
Re: Return Requests: notification email not being sent to ad
Posted: Sat Apr 14, 2012 4:46 am
by Avvici
straightlight wrote:The best solution would be to create a cron job so that you don't have to deal with all the emails additionally with the tasks you already have to take care of from the admin. This is what most businesses do; to split the tasks without the overkill so that on an every constant time period, the emails gets received when involved.

I agree with this solution. But most people, even folks that have been working with OC for a long time don't know what that is let alone could set it up lol.
Re: Return Requests: notification email not being sent to ad
Posted: Fri May 11, 2012 12:04 am
by apendragon
Let me preface this by saying I'm not much of a programmer. What I've done here is not elegant, but it does work. Tried and true on 1.5.2.1.
EDIT: catalog/controller/account/return.php
FIND:
BEFORE, within the IF statement, ADD:
Code: Select all
$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($this->config->get('config_email'));
$mail->setSender('STORE NAME');
$mail->setSubject(html_entity_decode('STORE NAME Return Request', ENT_QUOTES, 'UTF-8'));
$mail->setText(strip_tags(html_entity_decode('This is a notification: a customer has requested to return a product from an order. Please log in to the Store Admin. The details are under Sales --> Returns.', ENT_QUOTES, 'UTF-8')));
$mail->send();
A real programmer could probably make that more fancy, complete with actual information about the return. That seems to be the right spot for the code, though. It sends upon a successful return submission.
Jason
Re: Return Requests: notification email not being sent to ad
Posted: Fri May 11, 2012 12:35 am
by straightlight
By setting this line manually:
It would only involve one store while OC can rather validate a store setting before an email gets sent based on the selected store.

Re: Return Requests: notification email not being sent to ad
Posted: Fri May 11, 2012 11:17 pm
by apendragon
True. But whatever other file I lifted the bulk of that code from, I don't think the variable store name was working. I invite anyone to help me make this better. What I have here is purely utilitarian.
Re: Return Requests: notification email not being sent to ad
Posted: Fri May 11, 2012 11:33 pm
by labeshops
I would also like to get an email when a customer updates info on a return ticket. Any suggestions there?
Re: Return Requests: notification email not being sent to ad
Posted: Sat May 12, 2012 1:24 am
by straightlight
apendragon wrote:True. But whatever other file I lifted the bulk of that code from, I don't think the variable store name was working. I invite anyone to help me make this better. What I have here is purely utilitarian.
Try the XML version.
Re: Return Requests: notification email not being sent to ad
Posted: Wed May 16, 2012 8:15 pm
by tophat
straightlight wrote:apendragon wrote:True. But whatever other file I lifted the bulk of that code from, I don't think the variable store name was working. I invite anyone to help me make this better. What I have here is purely utilitarian.
Try the XML version.
Thanks for posting this. I've implemented the xml, however, it doesn't appear to be working. No emails recieved and I can see the returns in the admin... so I'm not sure as to what to say really...
Re: Return Requests: notification email not being sent to ad
Posted: Wed May 16, 2012 9:53 pm
by straightlight
From the VQMod Manager or the vqmod.log, can you report any errors based on this event ?
Re: Return Requests: notification email not being sent to ad
Posted: Wed May 16, 2012 10:54 pm
by tophat
Hi, Checked the log and no errors to report of. It's placed alongside all my other working mods so I can't foresee what the issue could be. There's not a limit on vqmods is there? thanks.
Re: Return Requests: notification email not being sent to ad
Posted: Wed Jul 04, 2012 4:15 am
by Gorilla
I tried using that xml file and got this error
Notice: Undefined property: Customer::$getFirstName in //vqmod/vqcache/vq2-catalog_controller_account_return.php on line 340Notice: Undefined property: Customer::$getLastName in /vqmod/vqcache/vq2-catalog_controller_account_return.php on line 340Warning: Cannot modify header information - headers already sent by (output started at Store/index.php:104) in vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /index.php:104) in /vqmod/vqcache/vq2-system_engine_controller.php on line 29