rob84 Posted October 7, 2014 Share Posted October 7, 2014 Hello. I have this code that works good in classes/Mail.php for sending e-mail to customer with attached invoice when order status changes to "Shipped" : if (strpos($template, 'shipped')){ $id_factura = $templateVars['{id_order}']; $orden = new Order($id_factura); $factura['content'] = PDF::invoice($orden, 'S'); $factura['name'] = $id_factura.'.pdf'; $factura['mime'] = 'application/pdf'; $message->attach(new Swift_Message_Attachment($factura['content'], $factura['name'], $factura['mime'])); } Now I need that the same e-mail should be sent to store admin too. Which function to use to send this email? Thanks. Link to comment Share on other sites More sharing options...
rob84 Posted October 16, 2014 Author Share Posted October 16, 2014 Anyone ? I think I have to add only a string with Mail:Send or something similar just after $message ... any clue ? Link to comment Share on other sites More sharing options...
tuk66 Posted October 17, 2014 Share Posted October 17, 2014 It is responsibility of the mailalerts module. Try to find an answer in the code. Link to comment Share on other sites More sharing options...
rob84 Posted October 27, 2014 Author Share Posted October 27, 2014 It is responsibility of the mailalerts module. Try to find an answer in the code. Can be done adding a string in classes/Mail.php just under the line: $message->attach(new Swift_Message_Attachment($factura['content'], $factura['name'], $factura['mime'])); ? Thanks. Link to comment Share on other sites More sharing options...
r_ekkie Posted January 22, 2015 Share Posted January 22, 2015 Rob, I tried your mod in Presta 1.6.0.9 but when I change the state to Shipped I get a 500 server error. Where exact should I add your code? 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