User Tools

Site Tools


tutorials:zencartmods:barcodeinv.html

Adding a barcode to invoices

Barcodes on invoices can be very handy if you have an automated shipping system. This mod will show you how to do that with only one line of added code to invoice.php. You'll need a barcode generator, this public domain code snipped by Charles J. Scheffold is ten years old and works great :)

Download barcode.php.zip and uncompress it, upload the barcode.php file to your zencart/admin directory

Then we can call this code to make a barcode image wherever we want! Open up admin/invoice.php and stick this line where ever you want the barcode

We suggest:

find line 48 of invoice.php

<!-- body_text //-->

and replace it with:

<!-- body_text //-->
<?php echo '<img src="barcode.php?barcode=' . $oID . '&width=250&height=50" />'; ?>;
/home/ladyada/public_html/wiki/data/pages/tutorials/zencartmods/barcodeinv.html.txt · Last modified: 2016/01/28 18:05 (external edit)