Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Note for customers using custom quote PDFs in versions before 2.6: It is no longer necessary to override the templates for PDF download and PDF attachment. Both are now done with a single template, see below.

You can override the output of quotation PDFs in the same way as other templates (see Custom Templates for reference). However, templates used for PDF generation are more delicate:

  • The produced HTML and CSS needs to adhere strictly to HTML 1.1 strict and CSS level 3.

  • As per domPDF documentation, CSS floats are supported, but do not work reliably. Best to use tables for layout.

  • Nested tables (<table> within a <table>) may give bad results, at least as soon as tables span across pages.

  • For images, set width and height dimensions. Layout flows do not work reliably without it.

  • In case your customizations have led to a sizeable custom CSS file (say more than 2kB), consider creating a separate stylesheet for the quotation PDF for performance reasons (set the URL to that stylesheet in the <head> block of the template).

  • Since ConfigBox 2.6.26 we moved the header/footer PHP to a separate template file (header_footer) for easier customization. If you override something and don’t need changes to the header/footer, simply don’t copy the header_footer.php template to your customization folder. The system will load the original template then.

  • Mind that if you want to adjust page margins, set margins on the <body> tag and use a CSS class to refer to the <body> tag.

Location of the original template:
Joomla: /components/com_configbox/views/quotation/tmpl/default.php
Wordpress: /wp-content/plugins/configbox/app/views/quotation/tmpl/default.php

Location of the custom template:
Joomla: /components/com_configbox/data/customization/templates/quotation/default.php
Wordpress: /wp-content/plugins/configbox/app/data/customization/templates/quotation/default.php

The template uses output of other views

The template uses the output of other views (namely ‘record’ and ‘positions’. If you need to alter this part of the quotation, you can make overrides of these templates, but be mindful about the fact that these views are used elsewhere (admin order page, user order page, checkout page and possible more in the future).