4.5 Using a product blocks
The product blocks are simple but powerful parts of your pdf templates. They are used to display all products/services from modules Invoices, Quotes, Sales Order and Purchase Order in your pdf files regardless of the number of products/services for particular record. Below you can find simple example where invoice contains three products which are automatically seen in the final pdf exported file. You don’t need to create template for three rows in the table, just define start and stop of the product block and product fields according to your needs. Next chapter describes how to create your own product block. In addition, we also introduced some default product block templates as well as tool for managing them (7.4).
Picture 4.9 Product block usage
Create new product block in EditView
You can find Product block tab in EditView which allows inserting, editing and creating of product blocks. In case that product block templates are not sufficient for you, it is easy to create your own product block:
- Go to Product block tab and insert product block start variable (#PRODUCTBLOC_START#) and product block end (#PRODUCTBLOC_END#).
-
Add all necessary product/service fields according to your needs between (#PRODUCTBLOC_START#) and (#PRODUCTBLOC_END#) and provide formatting if needed.
Picture 4.10 Create product block
Insert and edit product block template
There are already created product block templates which you can insert from product block tam and later edit if needed. These templates are available only for modules Invoices, Quotes, Sales Order and Purchase Order that displays product block. The product block templates created within product block tool can be added in the same way. You can simply add the whole product block template into your template by:
- Go to Product block tab.
- Select product block template.
- Click on [Insert into template] button.
Picture 4.11 Insert product block template
When the product block template is inserted you can modify it according to your needs. For example you can add new cells / rows / columns, change font, change the background color, etc. You can edit layout like a table or you can add some new variables / labels as well.