Jump to content

Register new pdf template and send it with invoice


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...