mehnihma Posted October 15, 2012 Share Posted October 15, 2012 Hello Is there any way when costumer orders a product to send him confirmation but not invoice? And to automatically send invoice when I change order to Payment received? Thanks Link to comment Share on other sites More sharing options...
Pippo3000 Posted October 16, 2012 Share Posted October 16, 2012 not quite sure whether I missed something but isn't this how it works out of the box? that a customer gets an email and no invoice sent attached? just wondering because I would love to send the invoice right away instead of having my customers download it themselves.... Link to comment Share on other sites More sharing options...
mehnihma Posted October 16, 2012 Author Share Posted October 16, 2012 (edited) When something gets orderd it automatically sends order confirmations with pdf Invoice to the costumer Edited January 20, 2013 by mehnihma (see edit history) Link to comment Share on other sites More sharing options...
mehnihma Posted January 20, 2013 Author Share Posted January 20, 2013 How Can I change that when I set payment received that then Invoice is sent to costumer? Thanks Link to comment Share on other sites More sharing options...
tuk66 Posted January 22, 2013 Share Posted January 22, 2013 When something gets orderd it automatically sends order confirmations with pdf Invoice to the costumer Not for every payment module. PDF invoice is not attached for Bankwire payment and even attached after changing the status to "Payment accepted". Link to comment Share on other sites More sharing options...
nadiap Posted January 22, 2013 Share Posted January 22, 2013 (edited) I haven't reached this part of the cart to customise yet - or tried anything with a test customer -- and as I've not used PS before, is an order able to be changed (eg to change shipping cost, or even remove shipping cost) before an invoice is sent -- like an amended invoice ?? sorry if I should know this Edited January 22, 2013 by nadiap (see edit history) Link to comment Share on other sites More sharing options...
mehnihma Posted March 2, 2013 Author Share Posted March 2, 2013 You cannot add/remove shipping after order, just add discounts My problem is that I want when I choose payment accepted that email which is sent to costumer has attached invoice, how to do that? Link to comment Share on other sites More sharing options...
isoler Posted May 22, 2013 Share Posted May 22, 2013 Hello, I've solved this issue on Prestashop 1.4.9 You have to add the following on /classes/Mail.php on the function Send() just before the line with the comment: /* Send mail */ (in my file line 201): if (strpos($template, 'payment')){ $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'])); } This code attaches the invoice to 'Payment accepted' emails. If you want to attach the invoice to other emails just find the name of the template's mail and add it to the condition on the if statement. For example, if you want to attach the invoice too on the Shipped emails your code should look like this: if (strpos($template, 'payment' || 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'])); } I hope this help somebody, I googled around but I've found a lot of questions about this but no answer. Ivan. Link to comment Share on other sites More sharing options...
Yonkiedoodle Posted June 5, 2013 Share Posted June 5, 2013 I have tried the above code on 1.5.4 but to no avail. I did notice that it uses $template_vars now instead of $templateVars though. Changed it but still no dice. Is there perhaps an update on this available somewhere? Some help would be greatly appreciated! 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