The UPC Barcode Field module defines a UPC barcode CCK field in Drupal. The module is capable of turning a 12 digit UPC string into a PNG barcode image that can be printed out and scanned by a capable barcode reader.
This module has been developed for a specific use-case for the uCount module, but it has been designed with the goal of being independent of that system.
Where to obtain the einbarcode.py script
A copy of the necessary einbarcode.py script can be obtained here: http://einbarcode.danenet.org
How to install and use
How to make PHP aware of the location of python
The UPC Barcode Field module uses the PHP exec() function to call the 'python' command on the server. Sometimes, depending on your server's distribution, the python command is located in a directory that is not inside the PHP user's path variable. This can be solved by placing the following code at the end of your settings.php file:
(Assume that the python command is located in '/usr/local/bin'):
$path = getenv('PATH'); $new_path = '/usr/local/bin'; // Or the location of the python interpreter putenv("PATH=$new_path:$path");
Windows servers not currently supported
Do to the way the python command is called, Windows web severs are not currently supported. This is a known issue and will be resolved in upcoming versions.
- Maintenance status: Unknown
- Development status: Unknown
- Module categories: Content Construction Kit (CCK), E-commerce
- Reported installs: 5 sites currently report using this module. View usage statistics.
- Downloads: 1,381
- Last modified: June 24, 2015
- Stable releases receive coverage from the Drupal Security Team.
Look for the shield icon below.