webrider Posted May 5, 2015 Share Posted May 5, 2015 Bonjour, Je cherche à envoyer le delivery-slip.pdf au lieu de la facture.pdf dans l'email de confirmation(email_conf). A priori Il faut modifier classes/PaymentModule.php mais je cale un peu sur le variables. Je pense que mes modifications en bleu sont -à peu prés!- correctes; je dois avoirun problème sur la variable en rouge. Code d'origne // Join PDF invoice if ((int)Configuration::get('PS_INVOICE') && $order_status->invoice && $order->invoice_number) { $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'; Code modifié // Join PDF invoice if ((int)Configuration::get('PS_DELIVERY_SLIP') && $order_status->delivery_slip && $order->delivery_slip_number) { $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_DELIVERY_SLIP, $this->context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_DELIVERY_SLIP_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->delivery_slip_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } Merci pour votre aide si vous avez une petite piste? Marc 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