WooCommerce Barcode Orders

For every ordered placed on your site, WooCommerce Barcodes generates unique barcodes, which can be used either on e-tickets, e-reservations, etc or anything else that would benefit from having a scannable barcode attached to it.

In the end of this tutorial today you are going to understand how to utilize WooCommerce barcodes.

Let’s begin!

In order for generating a barcode, there is a variety of free optional plugins in WooCommerce and WordPress. However, in this tutorial we are going to use a premium WooCommerce Order Barcodes plugin provided by WordPress itself. This plugin costs extra $79.00 for convinient.

But you don’t have to worry much because I believe alternatives free extensions provide just the same functions. Also, the settings of these extensions are somewhat wholly alike. Therefore, if you are using WooCommerce properly there should be no difficulty for you to figure out the configurations, based on what you will learn throughout this tutorial.

Okay, so WooCommerce Order Barcodes , let’s begin.

WooCommerce Barcode in General

As soon as an order is placed, for which there is a barcodes generated. Moreover, barcodes are also generated for orders that are created manually via the WordPress dashboard. Once an order has been placed, the barcode is included in all order emails as well as the order details page in the customer’s WooCommerce account area. This allows the customer to easily print out the barcode if necessary.

WooCommerce Barcode in general
WooCommerce Barcode in general

Installation WooCommerce Barcode

  1. Purchase & download the plugin zip file from WooCommerce.com.
  2. Login to your WordPress Admin > Plugins > Add New from the left hand menu.
  3. Click Upload > Browse to select the zip file from your computer > OK > Install Now
  4. Activate the plugin.

Configuration

To configure your barcodes go to WooCommerce > Settings > Order Barcodes:

Barcodes available settings
Barcodes available settings

From here you can customize the type as well as the colors  of barcodes that will be generated by your site. Note that any setting re-adjustments will ony affect future barcodes – barcodes that have already been created will not be affected.

There are five barcode types available to use, here is how they each looks like:

5 types of barcodes
5 types of barcodes

Standard USB barcode scanners works exclusively with code 39, 93 and 128 barcodes , while the Data Matrix and QR Code types will work with digital scanners and mobile devices. The type of barcode that you will use, therefore, depends on the best solution for your particular case.

Utilization

 Generating barcodes

Once you activate the extension is active, from then on barcodes are generated automatically whenever a purchase is placed. So you don’t need to do any extra setup to get work correctly. Conviniently, in the WordPress dashboard you are able to view existing barcodes on the order edit screen :

Barcode dashboard display
Barcode dashboard display

However, barcodes will not automatically added to existing orders. In order to generate barcodes for these orders you need to simply visit the order page in the WordPress dashboard and a unique barcode will be generated adding to the order as you load the page.

Scanning barcodes using shortcode

To scan your barcodes you can use the [scan_barcode] shortcode. This will generate a form that looks like this:

arcode-scan-form
Barcode scan form

This form will only be usable by users with the manage_woocommerce capability. It allows you to scan or enter a barcode and perform one of four actions on the order to which it is linked:

  • Check in – Order is marked as ‘checked in’.
  • Check out – Marked the order as ‘checked out’.
  • Look up – Look up and display the order details.
  • Complete order – Mark the order as complete.

You can pre-select one of these options by setting the action parameter of the shortcode to one of the following: lookup, complete, checkin or checkout. The shortcode with a pre-set action will look like this: [scan_barcode action="checkin"]. All actions are performed via ajax so the page does not reload after running them – this means you can scan in barcodes rapidly without long wait times between each scan. The order details are displayed using the view-order.php template, so if you have customised that template on your site then they will follow those same customizations.

Using a USB scanner

If you are using a USB scanner to scan in your barcodes, then the scanner will be automatically detected and the action will be performed without you having to click the ‘Go’ button. This will save a lot of time when, for example, scanning e-tickets at the door to a concert.

Manually typing in a barcode

When manually typing in a barcode you must type in the full string of text that appears below the barcode and then hit enter or click the ‘Go’ button.

Using a smartphone or tablet

The most common way to scan barcodes for events is using a smartphone or tablet. This can be easily achieved by using the scanning form along with a free app on your phone or tablet. All you need to do is load up the page with the scanning form in the browser of your smartphone or tablet and then open up one of the many apps available for this purpose and you can scan your barcodes quickly and easily. Here are two that are very effective: iScan or Barcode Scan to Web for iOS (iPhone, iPad or iPod Touch) Barcodescanner Keyboard for Android.  You can do a simple search of the iTunes Store as well as the Google Play Store to find other similar apps as well. Specific usage instructions will be available in the apps themselves.

Troubleshooting

If you are getting a ‘permission denied’ error when you attempt to scan a barcode, as of v1.1 you will see one of the following two error messages:

1. Security check failed

In this case the security token (also known as a ‘nonce’) is not being checked correctly. This will most likely be due to how your server is setup, so if you get this error then adding the following snippet to your theme’s functions.php file will disable the nonce check:

<?php add_filter( 'woocommerce_order_barcodes_do_nonce_check', 'disable_woocommerce_order_barcodes_nonce_check' ); 
function disable_woocommerce_order_barcodes_nonce_check( $do_check ) { 
// Do any required pressing here $do_check = false; return $do_check; 
} 
?>

 

2. You do not have sufficient permissions to scan barcodes

In this case the user you are logged in as does not have permission to scan barcodes. The default permissions required are that the user has the ‘manage_woocommerce’ capability, but you can change this to anything you want (or even make it different per user). If you get this error when you don’t think you should then adding the following snippet to your theme’s functions.php file will enable scanning permissions for all users (but you can edit it to process any requirements you like):

<?php add_filter( 'woocommerce_order_barcodes_scan_permission', 'modify_woocommerce_order_barcodes_scan_permission' ); 
function modify_woocommerce_order_barcodes_scan_permission( $has_permission ) {
// Do any required permission checks here $has_permission = true; return $has_permission; 
}
?>

Additionally,

I went to WordPress admin > WooCommerce > Plugin > Add New > “WooCommerce Barcode” in the search bar. There are many free plugins which you can give a try, here are results I found:

Free WooCommerce barcode
Free WooCommerce barcode

Congratulations !

So now you have known how to generate a barcode using plugins. The barcode can be hugely effective in times where a customer needs validation, or in today’s trend – to scan a barcode using digital device to check for authority. Etc.

If you have any question please leave down below or if you find this tutorial helpful. We’d love to hear.

Cheers!

Author: Matthew

Matthew is a copywriter at WooBeginner - an encyclopedia of WooCommerce tutorial. When he's not online, he enjoys sports and traveling. He loves art and entrepreneurship.

Leave a Reply

*