How to Add Barcodes to Shopify Packing Slips for Better Fulfillment

Published on Jul 22, 2024

By Liam Gallagher

#eCommerce#Shopify#Guide
Man in Black Button Up Shirt Standing Beside Man in Gray Polo Shirt

Are you looking to enhance your Shopify store’s order fulfillment process by adding barcodes to your packing slips? You’re in the right place! This guide will walk you through the process of incorporating barcodes into your native Shopify packing slips, improving efficiency and accuracy in your shipping operations.

Understanding the Challenge

Many Shopify store owners face the challenge of adding barcodes to their packing slips, especially when using the native Shopify packing slip function rather than third-party apps. The main hurdle is that Shopify’s native packing slip only allows images hosted on their servers, limiting the options for adding external barcode images.

The Solution: Using Barcode Fonts

The most effective and widely-used solution to this problem is utilizing barcode fonts directly within your packing slip template. This method doesn’t require external images or apps, making it compatible with Shopify’s native packing slip function.

Choosing the Right Barcode Font

For this solution, we’ll be using the Libre Barcode font family. These fonts are free, easy to implement, and work well with Shopify’s system. The two most popular options are:

  1. Libre Barcode 39 Text
  2. Libre Barcode 128

Each of these fonts has its strengths, with Barcode 39 being more versatile for alphanumeric characters and Barcode 128 being more compact and efficient for numeric-only data.

Implementing the Barcode Font

To add the barcode font to your Shopify packing slips, follow these steps:

  1. Download the Font: Visit https://fonts.google.com/ and search for the Libre Barcode font of your choice.

  2. Upload the Font: Extract the TTF file from the downloaded ZIP and upload it to your Shopify admin under Settings > Files.

  3. Create a CSS File: Convert the font file to a CSS file with the font embedded as a data URL. This step is crucial for ensuring the font displays correctly in the generated PDF.

  4. Upload the CSS File: Upload the created CSS file to your Shopify Files section and note the URL.

  5. Edit the Packing Slip Template: Modify your packing slip template to include the new font and display the barcode.

Modifying the Packing Slip Template

Here’s how to edit your packing slip template to include the barcode:

  1. In your Shopify admin, go to Settings > Shipping and delivery > Packing slips.

  2. Add the following line at the top of your template to link the CSS file:

    <link rel="stylesheet" href="YOUR_CSS_FILE_URL_HERE" type="text/css" media="all">
  3. Where you want the barcode to appear, add this code:

    <p style="font-family: 'Libre Barcode 39 Text'; font-size: 90px">*{{ order.order_number }}*</p>

    Note: The asterisks before and after the order number are crucial for making the barcode readable by scanners.

Troubleshooting Common Issues

Barcode Not Displaying

If you’re seeing the order number in plain text instead of a barcode:

  1. Double-check that your CSS file is correctly linked in the template.
  2. Ensure the font family name in your template matches exactly with the one in your CSS file.
  3. Try increasing the font size to make the barcode more prominent.

Barcode Not Scanning

If scanners are having trouble reading the barcode:

  1. Make sure you’ve included the asterisks before and after the order number.
  2. Try adjusting the font size for better clarity.
  3. Ensure there’s sufficient white space around the barcode.

Font Suddenly Stops Working

If the barcode font suddenly stops displaying:

  1. Check if the CSS file is still accessible via its URL.
  2. Re-upload the CSS file and update the link in your template.
  3. Clear your browser cache and try previewing the packing slip again.

Advanced Customization

Modifying Barcode Content

You can customize what information is encoded in the barcode. For example, to include additional order details:

<p style="font-family: 'Libre Barcode 39 Text'; font-size: 90px">*{{ order.order_number }}-{{ order.created_at | date: '%Y%m%d' }}*</p>

This would create a barcode that includes both the order number and the order date.

Styling the Barcode

You can further style the barcode using CSS to fit your brand’s aesthetic:

<p style="font-family: 'Libre Barcode 39 Text'; font-size: 90px; color: #000000; background-color: #ffffff; padding: 10px;">*{{ order.order_number }}*</p>

This example adds a white background and some padding around the barcode for better visibility.

Best Practices for Barcode Implementation

  1. Test Thoroughly: Always test your barcodes with various scanning devices to ensure compatibility.

  2. Keep It Simple: Avoid overcrowding your packing slip. The barcode should be clear and easy to scan.

  3. Regular Updates: Periodically check and update your barcode implementation to ensure it continues to function correctly with Shopify updates.

  4. Backup Your Template: Always keep a backup of your working packing slip template before making changes.

By following this guide, you should be able to successfully add barcodes to your Shopify packing slips, streamlining your order fulfillment process and enhancing your overall operational efficiency. Remember, the key is in the proper implementation of the barcode font and careful customization of your packing slip template.

Take Our Quick Quiz:

Which primary product image do you think has the highest conversion rate?