Tag Archives: variables

  • HTML2PDF User manual - Using variables

    Posted on July 24, 2012 by ext4mage

    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

  • HTML2PDF User manual - Using formatting

    Posted on July 24, 2012 by ext4mage

    Using formatting

    There are some standard formatting options available in the HTML2PDF module. These formatting can be used on all variables, whether or not they are computed or single. See more about computed variables in section Using inline coding.

    The last tab in help pages, is a list of all the available formatting options. HTML2PDF User manual - listing formatting in help

    The way you use formatting is like follows for a single variable

    {{formatting variable_code}}        //the format
    {{format_price order_data_subtotal}}
      //example, will print the subtotal of order with the correct currency formatting
    

    If you have inline code the formatting of that is as follows

    ##formatting the_code##             //the format
    ##format_price {{order_data_subtotal }}-{{order_data_discount}}##
      //example, will print the subtotal minus the discount with the correct currency formatting
    
     
     
     

    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

2 Item(s)