sjohanna Posted September 14, 2010 Share Posted September 14, 2010 Hi there,I just received a request from my client.You know how in Gmail, all the email coming from the same email and subject are grouped together...Well, that's kind of annoying to keep track of the orders and it would be much better if the sender email for the New order was the customer email.Or maybe, is it possible to change the SUBJECT of the mail to include the customer name and order number? So the confirmation emails shouldn't be grouped?Any idea how to do that.I had a look at the mailalerts.php file but I am not sure where to change this parameter.I thought it would be somewhere here: if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html')) Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/'); Thanks for your tips! Link to comment Share on other sites More sharing options...
sjohanna Posted September 14, 2010 Author Share Posted September 14, 2010 All right, at least I managed to change the subject in Mailalerts.php: $subject = $this->l('New order').' '.$order->id.' '.$this->l('from').' '.$customer->firstname.' '.$customer->lastname; But if you know how to change the sender email I am still interested.I know that the contact form of the site does it.Johanna Link to comment Share on other sites More sharing options...
MaartenPol Posted December 14, 2010 Share Posted December 14, 2010 You were pretty close with the first lines. Thanks to your search I got it working to get the mail to be send out the customer. I did the following:in mailalerts.php line 176, right after the complete declaration of the array $templateVars $from = $customer->email; $fromName = ($customer->firstname.' '.$customer->lastname); then on line 180: Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $from, $fromName, NULL, NULL, dirname(__FILE__).'/mails/'); The from field of the mail is now the customer name and contains the email of the customer.I also putted this on line 135 to put the ordernumber in the subject: $subject = $this->l('New order: ' . sprintf("d", $order->id)); 1 Link to comment Share on other sites More sharing options...
tonis Posted January 4, 2012 Share Posted January 4, 2012 Thanks for this solution, works form me on presta 1.4 Link to comment Share on other sites More sharing options...
vasekcekal Posted January 4, 2012 Share Posted January 4, 2012 please, can you post here your edited mailalerts.php for 1.4? Link to comment Share on other sites More sharing options...
tonis Posted January 5, 2012 Share Posted January 5, 2012 please, can you post here your edited mailalerts.php for 1.4? Here it is. Alebo aj, tu to je mailalerts.php Link to comment Share on other sites More sharing options...
D-bird Posted November 23, 2012 Share Posted November 23, 2012 (edited) I'm also trying to figure out how to change the sender for my client's webshop. Now, when a new customer creates an account (probably the same thing with other e-mails, but I haven't tested them yet) and gets the account information by e-mail, there's Firstname Lastname in the sender field. I would like there to be the shop's name. Any tips on how I can change this? EDIT: Never mind. Got it Edited November 23, 2012 by D-bird (see edit history) Link to comment Share on other sites More sharing options...
mRL Posted May 6, 2014 Share Posted May 6, 2014 How to make those changes in version 1.5 because there is a little bit different? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now