Hello,


I wanted a print button to print the invoice. There were a number of conditions I wanted to meet. 1) The print button was not allowed to be printed. 2) no header and footer of the (html) page were allowed to be printed.

Below is the solution:

Place the following code in the invoice.php file (under line 89), or just before </head>:
Code:
<style type="text/css">
    @media print {
      .noPrint{
        display:none;
      }
}
     @page {
        margin-left: 0.5in;
        margin-right: 0.5in;
        margin-top: 0;
        margin-bottom: 0;
      }
</style>
Then insert on line 118, just before </table> the next line:
Code:
<div class"noPrint"><button onclick="window.print();" class="noPrint"><?php echo TEXT_INVOICE_PRINT_BUTTON; ?></button></div>
Save the file and open the file includes\languages\english\lang.meta_tags.php (or your language file) and add:

Code:
'TEXT_INVOICE_PRINT_BUTTON' => 'Print invoice',
There is now a button in the invoice that allows you to print the invoice directly.

Dirk