Our company is currently migrating to WHMCS to
terrorize clients kindly remind our clients to pay on time. While WHMCS is a pretty good tool out of the box, there’ll always be some customization you want to do. In our case, we wanted to add a line with detailed info about our company to the footer.
Interested in finding out how to add custom lines of your own to your WHMCS invoices? Then please, read on. We’ll be covering how to modify the HTML invoice on the website, and the PDF that’s downloaded or attached as a PDF
Modifying the HTML invoice
Modifying the HTML version of the invoice is pretty simple. All you need to do is add some HTML to the template plage.
1. Using your FTP client of choice, go to templates>(your template) and open viewinvoice.tpl
Now, add some HTML to display the customization you want, E.G
[code language=”html”]<div style="text-align:center;font-weight:bold;>
If you visit the client portal, you’ll immediately see the change in the invoices.
Modifying the PDF invoice
Modifying the content of the PDF’s is a little less forward, as it requires you to use a specific templating language. But it’s not that much harder than editing the HTML view.
To add a line, simply add the following snipper:
[code language=”php”]$footer .=’
<div style="text-align:center;font-weight:bold"><p>Your customizations goes here</p>
$pdf->writeHTML($footer, true, false, false, false, ”);[/code]
You can change the HTML between the ‘ ‘ with anything you’d like to add. When you try to open the PDF, your change should now be visible.