Invoice Templates Manager FAQ¶
Questions¶
Can customers pick their own invoice template?¶
No. One template applies to all invoices. Customers have no setting for it.
Does it change the invoice page in the client area?¶
No. Only the PDF changes. The invoice page keeps your theme's layout.
Can I use different templates per product, customer group or language?¶
No. The extension selects one global template.
Do old invoices get the new layout?¶
Yes. Paymenter generates the PDF each time it is requested, so every invoice uses the template that is selected at that moment.
Can I use Blade or PHP in a template?¶
No. A template is plain HTML. The extension only replaces the placeholders listed in the placeholder reference.
Which wins, the extension setting or the Default flag?¶
The Default invoice template setting. The Default Template flag is only used when the setting is empty or points to an inactive or deleted template. See Which template is used.
How do I go back to Paymenter's own invoice PDF?¶
Either turn off Enabled on the extension, or clear Default invoice template and make sure no active template is flagged as default.
What happens to my templates when I uninstall?¶
They stay in the ext_invoice_templates table. See Uninstalling for how to remove them.
Troubleshooting¶
Invoice PDFs fail with a database error after enabling¶
The table ext_invoice_templates does not exist. Run the migration:
cd /var/www/paymenter
php artisan migrate --path=extensions/Others/InvoiceTemplates/database/migrations
Until then, PDF downloads fail, and so does the PDF that Paymenter attaches to invoice e-mails.
The PDF still has Paymenter's default layout¶
Check these points in order:
- The extension is installed and Enabled is on.
- The template selected in Default invoice template has Active switched on.
- If the setting is empty, one template has both Active and Default set in the list.
If no active template is selected or flagged, the extension does nothing and Paymenter uses its own layout.
The Default invoice template list is empty¶
The list only shows active templates and only once the table exists. Run the migration, enable the extension, load any page once so the built-in templates are created, then reload the settings page.
I do not see Invoice Templates in the admin navigation¶
The extension must be enabled, and your role needs the permission admin.invoicetemplates.templates.view. See Permissions.
I deleted all templates and the built-in ones came back¶
That is intended. When the table is empty, the extension recreates Modern Blue, Minimal Clean and Dark Professional and flags Modern Blue as default. Keep at least one template, for example an inactive one, if you do not want them back.
The address or the paid date is missing in the PDF¶
{{customer_address}}, {{customer_city}}, {{customer_zip}}, {{customer_country}} and {{invoice.paid_at}} are empty in real PDFs, although the preview shows sample values for them. See the placeholder reference.
Subtotal, tax and total do not add up¶
The subtotal and the total are both the sum of the item prices, and the tax is calculated on top of the subtotal. With a tax rate, subtotal plus tax is higher than the total. See the warning under Amounts. If this does not fit your tax setup, print only {{total}} on your template.
A tax amount is printed although I do not charge tax¶
The extension calculates tax whenever a tax rate in Paymenter matches the customer's country or all countries. Remove {{tax}} and {{invoice.tax}} from the template if you do not want the line.
A placeholder is printed as text, for example {{ total }}¶
Placeholders must be written exactly as documented, in lower case and without spaces inside the braces. Unknown placeholders are left in the PDF unchanged.
My uploaded file was not applied¶
- The file must be of type
text/htmlortext/plain. - The upload only takes effect when you save the template.
- Template Content (HTML) is required, so the form does not save while that field is empty. Enter any text. The upload replaces it.
The logo is missing or the PDF fails when a logo is set¶
- If no logo is set in Paymenter's settings, the extension prints the company name instead.
- The extension uses PHP's GD extension to scale the logo. Make sure GD is installed, with support for your logo's image format.
The PDF looks different from the preview¶
The preview is shown by your browser, the PDF is rendered by Paymenter's PDF library (DomPDF) on A4 portrait. Modern CSS that works in the browser may not work in the PDF, and JavaScript does not run. Use tables and basic CSS for layout, as the built-in templates do, and test with a real invoice.
The table rows of the items do not match my columns¶
{{items_table}} always outputs four cells per row: description, quantity, unit price and line total. Your table header needs the same four columns.