webrider Posted April 30, 2015 Share Posted April 30, 2015 Good morning, I need to send the automatic confirmation to the admin of the shop, who can then forward it. I understand it is is classes/payment module I have to modify the code below probably the line in bold but I don't know which variable to put instead of customer. Or it is possible to put directly an email address? Mail::Send( (int)$order->id_lang, 'order_conf', Mail::l('Order confirmation', (int)$order->id_lang), $data, $this->context->customer->email, $this->context->customer->firstname.' '.$this->context->customer->lastname, null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); Thank you in adavnce for your help and time! Link to comment Share on other sites More sharing options...
PascalVG Posted May 1, 2015 Share Posted May 1, 2015 Yes, you should be able to just add the admin email address there. Additionally, you could send a sender's email and sender's name (Maybe as an "administrative reminder", you actually could give the customer's email and name here, just as if the customer sent the Email. :-) ) (Make backup of the file, just in case) Mail::Send( (int)$order->id_lang, 'order_conf', Mail::l('Order confirmation', (int)$order->id_lang), $data, '[email protected]', $this->context->customer->firstname.' '.$this->context->customer->lastname, null, <-- If needed, you could add a sender's email address here null, <-- If needed, you could add a sender's name here $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); Give it a try, pascal. Link to comment Share on other sites More sharing options...
bellini13 Posted May 1, 2015 Share Posted May 1, 2015 I believe you could also change it to null, which would force Prestashop to use the 'shops' email address defined in the store contacts page. Assuming the "admin of the shop" has their email address already configured there. Also note, that the mail alerts module is typically used to notify merchants of new orders. Why would you suppress the customer one? 1 Link to comment Share on other sites More sharing options...
webrider Posted May 3, 2015 Author Share Posted May 3, 2015 oups away for few days... I thank you for your help both and try it now and let you know Link to comment Share on other sites More sharing options...
webrider Posted May 3, 2015 Author Share Posted May 3, 2015 Hi, I have tried your solution Pascal (thank you!), it does prevent to send to my customer the email_conf (also reached commenting /* the full section) but I don't receive the emails. I have tried with the email alrt module activated or not. The reason why I want the email_conf + the email alert option (Bellini13) is because email_conf is more advanced including the pdf (I beleive I can set this up in another email template) + I have to send manually this email because the order is confirmed after a call confirmation, so can't be sent automatically when validating the order. I want it in my inbox ready to send. I understand I can use a pre order module but I want to limitate them for now. Link to comment Share on other sites More sharing options...
webrider Posted May 3, 2015 Author Share Posted May 3, 2015 mmm, Pascal I'm so stupid, a prick... it works fine I forgot to uncomment this section (where I left it a few days ago!). Many thanks in any case Link to comment Share on other sites More sharing options...
PascalVG Posted May 4, 2015 Share Posted May 4, 2015 :-) glad it works! Please mark as solved (see my footer) pascal 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