piyushkeshri Posted March 16, 2015 Share Posted March 16, 2015 Hi, I am using latest prestashop version PS 1.5.14. I am not able to receive Order Confirmation email on the customer side after placing order. It seems following code inside PaymentModule.php is not able to create a valid pdf that is not able to get attached. $pdf = new PDF($order->getInvoicesCollection(), 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'; However, when I change the following line of code, I am able to receive Order Confirmation email but the attached pdf is corrupt. $file_attachement['content'] = $pdf->render(); Anyone having any idea how to resolve the issue? I tried going through following posts but didn't have a luck. https://www.prestashop.com/forums/topic/75045-attachments-to-e-mails/page-2 https://www.prestashop.com/forums/topic/226737-attach-pdf-on-emails/ https://www.prestashop.com/forums/topic/623[spam-filter]invoice-pdfs-not-being-emailed/ https://www.prestashop.com/forums/topic/199655-why-my-invoices-are-not-attached-to-mails/page-2 Link to comment Share on other sites More sharing options...
tuk66 Posted March 16, 2015 Share Posted March 16, 2015 (edited) Many payment modules override methods from the PaymentModule class. Can be that your problem is related to only some payment module(s), not all. Than you would know what to fix. Edited March 16, 2015 by tuk66 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts