HTML2PDF User manual - Using variables

Posted on July 24, 2012 by ext4mage There have been 0 comments

Using variables

There are a lot of variables at your disposal when making a text or table element. All HTML2PDF accessible variables are shown in the help section, but beside these all default Magento variables can also be used. The way that you indicate a variable, is by using the format shown below in code example and screen print.

{{variable_code}}        //the format
{{order_data_status}}    //example, will print the status of the order

HTML2PDF User manual - using variables in PDF

The variables are divided up into the types of PDF that you can create. There are a general section of variables which can be used in all types of PDF’s. HTML2PDF User manual - listing order variables in help

And there a variables that can only be used in a specific type. There are groups of variables for invoice, shipment and credit memo, which can only be used for that specific type of PDF.HTML2PDF User manual - listing invoice variables in help

Some variables are to be used in the product table, which is general for all types of PDF’s and all types of product. In the help screens these are under the Product tab.

There are also variables specific for bundle product types, which include variables related to the bundle group and the single items in the bundle.
HTML2PDF User manual - listing product bundle variables in help

When creating a new text or table, and you need to debug. Then setup in System Configuration the specific order, invoice or product id and then see all the available variables in the help pages.

Download the tables with variables to CSV or Excel to sort and search trough. Do this and you can easy find the exact variable you are looking for.

 
 
 

The HTML2PDF extension for Magento
See more about the magento extension HTML2PDF


This post was posted in Manual and was tagged with html2pdf, magento, pdf, manual, variables