SiiXFX Posted February 4, 2019 Share Posted February 4, 2019 Hello, I would like to create a module which registers a new PDF template and attaches to an order with an second mail. So I started with the "hookActionValidateOrder" function to send a second mail with "Mail::send( ... )". This works without problems! But now I want to attach a custom PDF template to this mail. I don't know how to register a new PDF template like the "Invoice" template. I just need a minimal template to start with. I looked at the file "PaymentModule.php" which contains the standard invoice mail. Then I copied the line which says: $pdf = new PDF( ... ); I absolutely do not understand which parameter it needs. I believe that the 1st parameter is the content of the PDF file. The second parameter is the specification for the PDF template? But how do I register a new PDF template? Thanks in advance! Link to comment Share on other sites More sharing options...
tuk66 Posted February 5, 2019 Share Posted February 5, 2019 See the /classes/pdf/PDF.php file. The constructor takes these parameters: ($objects, $template, $smarty, $orientation = 'P') Link to comment Share on other sites More sharing options...
SiiXFX Posted February 5, 2019 Author Share Posted February 5, 2019 Thank you for the answer but I do not know how to register the template for the second parameter. Also I would like to know how the object must be constructed for the first parameter. Link to comment Share on other sites More sharing options...
tuk66 Posted February 5, 2019 Share Posted February 5, 2019 Learn from the code. It is better than describe it here. 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