buginternet Posted February 26, 2018 Share Posted February 26, 2018 Bonjour à tous, Je souhaite ajouter une pièce jointe PDF au mail "paiement accepté" en plus de la facture, Je suis sur un Prestashop 1.7. J'ai tenté sans succès de modifier la section // Join PDF invoice sur le fichier PaymentModule.php... Merci pour votre aide! Link to comment Share on other sites More sharing options...
tuk66 Posted February 27, 2018 Share Posted February 27, 2018 Il est possible de patcher le code ou de créer un override pour envoyer deux pièces jointes emaill. Regardez le forum. L'autre solution consiste à ajouter une ou plusieurs pages à la facture (une seule pièce jointe). La troisième solution consiste à utiliser un module tiers. Par exemple, dans le module M4 PDF Extensions, il est aussi simple que <pagebreak /> dans le modèle. It is possible to patch the code or create an override to send two emaill attachments. Look at the forum. The other solution is to add another page or pages to the invoice (only one attachment). The third solution is to use a 3rd party module. For example, in the M4 PDF Extensions module, it is as easy as <pagebreak /> in the template. Link to comment Share on other sites More sharing options...
buginternet Posted March 3, 2018 Author Share Posted March 3, 2018 (edited) Merci beaucoup M4 pour ta réponse j'ai choisi d'overrider et ça tourne. En fait je cherchais le code qui attachait la pièce jointe à ce mail, sur la 1.7 il fallait overrider OrderHistory.php au niveau de // Attach invoice and / or delivery-slip if they exists and status is set to attach them et ajouter $pdf1 = new PDF($invoice, PDF::TEMPLATE_MONTEMPLATE, $context->smarty); $file_attachement['monpdf']['content'] = $pdf1->render(false); $file_attachement['monpdf']['name'] = 'monpdf.pdf'; $file_attachement['monpdf']['mime'] = 'application/pdf'; puis modifier PDF.php en fonction et dans le dossier pdf créer le .tpl voulu Edited March 3, 2018 by buginternet (see edit history) 1 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