tanzj Posted September 25, 2014 Share Posted September 25, 2014 Please i need to attach a pdf file in validation mail. Can you help me! Thanks gig Link to comment Share on other sites More sharing options...
Eolia Posted September 25, 2014 Share Posted September 25, 2014 look at the Mail.php class: public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null) You can specify a $file_attachment.... Link to comment Share on other sites More sharing options...
tanzj Posted September 25, 2014 Author Share Posted September 25, 2014 You are very kind, if you could be more specific about what files work, sorry but i'm only a beginner. Thanks a lot gig Link to comment Share on other sites More sharing options...
tanzj Posted October 7, 2014 Author Share Posted October 7, 2014 Hello Eolia, when you have time it should be fine if you will be more specific! Thanks a lot tanzj Link to comment Share on other sites More sharing options...
Eolia Posted October 7, 2014 Share Posted October 7, 2014 look from classes/order/OrderHistory : if (Validate::isLoadedObject($order)) { // Join PDF invoice if order state is "payment accepted" if ((int)$result['id_order_state'] === 2 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { $context = Context::getContext(); $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $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; You havethe model with the pdf invoice. you can add your own pdf file here Link to comment Share on other sites More sharing options...
tanzj Posted October 7, 2014 Author Share Posted October 7, 2014 Thanks a lot! 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