User Tools

Site Tools


tutorials:zencartmods:barcodeinv.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:zencartmods:barcodeinv.html [2016/01/28 18:05] (current)
Line 1: Line 1:
 +====== Adding a barcode to invoices ======
 +
 +{{  :​zencartmods:​barcoded.jpg| ​ }}
 +
 +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|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
 +<​code>​
 +<!-- body_text //-->
 +</​code>​
 +
 +and replace it with:
 +<code php>
 +<!-- body_text //-->
 +<?php echo '<​img src="​barcode.php?​barcode='​ . $oID . '&​width=250&​height=50"​ />';​ ?>;
 +</​code>​
  
/home/ladyada/public_html/wiki/data/pages/tutorials/zencartmods/barcodeinv.html.txt · Last modified: 2016/01/28 18:05 (external edit)