Call_me_Dave Posted February 14, 2017 Share Posted February 14, 2017 (edited) Hi, I know this has been an issue for many of us. Still I am not able to find any FREE solution to this problem whatsoever. I am using Prestashop version 1.6.x.x and there in my email template there is a link to the invoice that customer must click to and finally he can download his .pdf invoice. Now I need that the invoice PDF file is directly attached to my email so the customer can just click on the attached PDF file to download or open it. I have read somewhere that I should comment this code below ↓↓↓ in class PaymentModule.php like this: // Join PDF invoice /*if ((int)Configuration::get('PS_INVOICE') && $order_status->invoice && $order->invoice_number) { $order_invoice_list = $order->getInvoicesCollection(); Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list)); $pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, $this->context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } else { $file_attachement = null; }*/ Unfortunately I don´t have an access to these files yet. Could You please try this solution ↑↑↑ for me and tell me please if this solution ↑↑↑ is correct and if it works? Thank You Friends. Edited February 14, 2017 by Call_me_Dave (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted February 14, 2017 Share Posted February 14, 2017 What email exactly? The invoice should be attached automatically to the order confirmation email and attaching it can be set for each order status. Link to comment Share on other sites More sharing options...
Call_me_Dave Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) What email exactly? The invoice should be attached automatically to the order confirmation email and attaching it can be set for each order status. Yes, It is automatically attached to my email but as a link to my shop backoffice and customer´s order page - like this: http://oi67.tinypic.com/whbsqt.jpg But what I need is a direct attachment to email like this: http://imgh.us/seee.png Do You understand now what is the difference? I would like to attach this invoice PDF file to customer´s order confirmation emails. Edited February 14, 2017 by Call_me_Dave (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted February 14, 2017 Share Posted February 14, 2017 I know, that's why I wrote that it should be attached as an attachment by default without any need of a module or code modification. Link to comment Share on other sites More sharing options...
Call_me_Dave Posted February 14, 2017 Author Share Posted February 14, 2017 I know, that's why I wrote that it should be attached as an attachment by default without any need of a module or code modification. But it is not exactly attached to order confirmation emails - there is just a link to Prestashop backoffice, not actual PDF file attached - here is the image: http://oi67.tinypic.com/whbsqt.jpg Link to comment Share on other sites More sharing options...
Daresh Posted February 14, 2017 Share Posted February 14, 2017 This is a standard text in email template. You should first check your configuration for invoices and for order statuses. Attaching a PDF invoice should not require any changes to the 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