Creating the Template

Enter Code to Include Order Number, Tracking Number, and Shipping Cost

Or

Enter Code to Include a Logo

Formatting the Template to 4" x 8"

Selecting the Thermal Printer

Setting the Default Label Format
Download a PDF Version of this Article



Background

With ShipWorks it is possible to modify your label template (the template used to print your labels) to accommodate printing to 4" x 8" label stock. You can also modify the label to include additional information such as a tracking number, ship date, label cost, or even your logo.


This is useful when you have label stock that includes a doc tab on which additional information needs to be printed or if you wish to add branding to your shipping labels.


This article will guide you through how to:

1.  Create a 4" x 8" label template.

2.  How to include additional information on the label.

  • Order Number, Tracking Number, and Label Cost
  • OR Your Logo


First Things First

The instructions below will work for any shipping provider that you may use.  We will be using FedEx in this example.  In addition, this article assumes that:


  • You are using 4" x 8" label stock that includes either space above the printed label or a doc tab above the printed label.
  • You're printing to a thermal printer
  • Your thermal printer is connected to your computer and you have successfully printed a test page to the printer.


The Process


Creating the Template

The first step is configuring the template that you will use to print your labels.  You will be creating a new template and adding code to the template that tells ShipWorks to include the Order Number, Tracking Number and Shipment Cost to the top of the printed label.  (Don't worry, we give you the code below.  You just copy and paste it!)  


If you would rather print your logo on the top of your label, we will give you code for that too!


1.  In ShipWorks, click on the Manage tab and then click on Templates.


WkSDsMliX3LweAheOkwt-JPFmgjbewzdlQ.png


2.  In the Template Manager, click on the Labels > Standard template to select it.


qCCLkiFJ99hvrufPr7-A3Dp6LycOoxSWZg.png


3.  Then, click the COPY button. and click OK.


dAOnGxzGtPEIK7agy4VjLwQcZzW_rYgGRQ.png


4.  You now have a copy of the ShipWorks Standard label template.  If it is not selected, select it and then click the Edit button.


AlXh8RwSBRG3dBHiYsffz9icBo0ecpalXg.png


5.  Rename the template.  For our example we will name the template Standard 4x8.


T9CDMvmIZvMlwyFX3gJZG6DQXnrS7MCl_g.png



6a.  Great!  Now it is time to add the code we need.  At the top of the Template Editor, select the Code tab.


z5dXJafY_GLnOLhLqc2nM9C6jXveqwlORQ.png


6b.  Click anywhere within the code and then press CTRL + A on your keyboard to select all of the code.  Then, press Delete on your keyboard.  (Yes, we actually wish to delete all of the code!)  You should now have a blank template like the screenshot below.


7bYXdXIBqlQR2YQIbHuMGf_5dVvZflu70A.png


Enter Code to Include Order Number, Tracking Number and Shipping Cost

If you would rather include your logo to the top of the label, skip down to the section on Adding Code to Include Your Logo.


6c.  Copy the below code by selecting it and pressing CTRL + C on your keyboard.


 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sw="http://www.interapptive.com/shipworks" extension-element-prefixes="sw">
    <!-- Imports -->
    <xsl:import href="System\Snippets" />
 
    <xsl:output method="html" encoding="utf-8" />
    <!-- Start of template -->
    <xsl:template match="/"><xsl:apply-templates /></xsl:template>
    <xsl:template match="ShipWorks">
    <xsl:variable name="pageFont" select="'font-family: Arial; font-size: 10pt;'" />        
    <html>
    <head>
        <title>Interapptive ShipWorks Template</title>
         <style>
            body, table { <xsl:value-of select="$pageFont" /> }
        </style>
    </head>
    <body style="{$pageFont}">
        
<!-- XXXXXXXXXXXXXXXXXXXX Go down to line 25 where you can pick and choose what you want in the template XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
        
    
        <xsl:variable name="labels" select="(//Primary | //Supplemental)/Label[@orientation = 'tall']" />
       
        <xsl:for-each select="$labels">
               
            <xsl:variable name="shipment" select="../../../.." />
            <table width="100%" height="100">
                       <tr>
            <td valign="center;" style="text-align:center;">
                             
                                Order # <xsl:value-of select="//Order/Number" />
                                <br />
                                Tracking Number:<xsl:value-of select="$shipment/TrackingNumber" />
                                <br />
                               Shipping Cost: $<xsl:value-of select="format-number($shipment/TotalCharges,'#.##')" /> 
                           
                            
               
                            </td>
                           </tr>
                    </table>
            <TemplatePartition>
         
                <img src="{.}" style="width:382; height:576;" /><br />
               
                <br />
                    
                           
                           
                     
               
            </TemplatePartition>
        </xsl:for-each>
    </body>
    </html>
    </xsl:template>
</xsl:stylesheet>

 


6d.  In ShipWorks, on the Code tab, place your cursor into line 1 and press CTRL + V to paste the code into your template.


h8BhcqpVZD8_4VPqhh4F_tcIH2yA-zEfzw.png


Perfect!  Now, jump ahead to step 7a below.


Adding Code to Include Your Logo

Please Note:  You will need to have your logo file available to you and formatted to the size you would like to have it appear on your label.  You will be pointing to the image file in a moment.


If you would rather include the Order Number, Tracking Number and Shipment Cost, click here.  


6c.  Copy the below code by selecting it and pressing CTRL + C on your keyboard.


 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sw="http://www.interapptive.com/shipworks" extension-element-prefixes="sw">
    <!-- Imports -->
    <xsl:import href="System\Snippets" />
 
    <xsl:output method="html" encoding="utf-8" />
    <!-- Start of template -->
    <xsl:template match="/"><xsl:apply-templates /></xsl:template>
    <xsl:template match="ShipWorks">
    <xsl:variable name="pageFont" select="'font-family: Arial; font-size: 10pt;'" />        
    <html>
    <head>
        <title>Interapptive ShipWorks Template</title>
         <style>
            body, table { <xsl:value-of select="$pageFont" /> }
        </style>
    </head>
    <body style="{$pageFont}">
        
<!-- XXXXXXXXXXXXXXXXXXXX Go down to line 25 where you can pick and choose what you want in the template XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
        
    
        <xsl:variable name="labels" select="(//Primary | //Supplemental)/Label[@orientation = 'tall']" />
       
        <xsl:for-each select="$labels">
               
            <xsl:variable name="shipment" select="../../../.." />
            <table width="100%" height="100">
                       <tr>
            <td valign="center;" style="text-align:center;">
                             
 <img src="imagelocation"></img>
                           
                            
               
                            </td>
                           </tr>
                    </table>
            <TemplatePartition>
         
                <img src="{.}" style="width:382; height:576;" /><br />
               
                <br />
                    
                           
                           
                     
               
            </TemplatePartition>
        </xsl:for-each>
    </body>
    </html>
    </xsl:template>
</xsl:stylesheet>

 


6d.  In ShipWorks, on the Code tab, place your cursor into line 1 and press CTRL + V to paste the code into your template.


 

h8BhcqpVZD8_4VPqhh4F_tcIH2yA-zEfzw.png


6c.  Now, we need to point ShipWorks to the image file of your logo.  Scroll down to line 31 of the code and find the code <img src="imagelocation"></img>.


dQRTYDX5fQaOSa187Ci5_NLHgdwD98MBBA.png


6d.  Replace imagelocation with the actual location of your logo image (be sure to leave the quotation marks in the code) :

  • If your logo is on your computer's hard drive the code would like similar to this: <img src="C:\Users\JohnDoe\Pictures\logoimage.jpg"></img> 
  • If your logo is stored on the internet, the code would look similar to this: <img src="http://www.pictureexample.com/logoimage.jpg"></img>
  • NOTE: If you use an image stored online and the URL includes any characters like &,=, or !, you might get an error. The template editor is an XSLT editor and processes these characters differently than an HTML editor. If you run into an error because a special character is in a URL, go to http://tinyurl.com/ and generate a URL without these characters and try again. 


hdh-h927WjHGdBRIhWJapJbd3_fbyYj4QQ.png


Note:  You can test to see if your logo shows up on the template by clicking on the Preview tab.  (Don't worry if it is not formatted properly, we will correct that in just a minute.)


h5GXZc5B6eQOHUOrkJn_4AJqu0J2BINQvQ.png


Formatting the Template to 4" x 8"
Now, let's format the template so that the 4" x 6" label prints with the additional information or your logo above it.  This will print onto your 4" x 8" label stock.

7a.  While still on the Template Editor screen, click on the Settings tab.  Then, select Labels.

jZydyNZtq5-DTIlU4ElYHNMIHS98iXGT-g.png


7b.  Click on the Custom Label Sheet button.  Then, click New.


HDQUMjcdHlB6AMFTQAK8eHtLrZmnAZZnMA.png


7c.  On the Custom Label Sheet screen, name the sheet 4x8.  Then, set the following options.


  • Sheet Size:  Custom
  • Dimensions:  4.00 x 8.00
  • Label Dimensions:  8.00 x 4.00
  • Leave all other fields as the default settings.

nHwP4nG2CD9KtI6GB81x5wVWzA-szksw4Q.png



7d.  Click OK and then  Close.


pN545I8j_kMbq2H5ag_T6l8dd-ABLd-F0g.png


7e.  Click on the Choose  button and select Custom > 4x8.


VamjhkMlnilUzLFUAnXrvlwKVpGtmuVVsA.png

Selecting the Printer

Now we need to select the thermal printer to which you will have your labels print.


8.  Still on the Template Editor screen, select the Settings tab and then Printing.


cUS1ozgfgXeTAplb4uoBFHvMLDaF9hOAMw.png


9.  From the Printer: drop-down menu, select the thermal printer to which you wish to have your labels print.  Note:  The source may change automatically to say Manual.  That's OK, this is normal.


ZetC-dK2096fd7NZQWRHiELdt6lIvXzQCQ.png


10.  Click Save. Then, click Close.


Set the Default Label Format to Standard

The template that we created in the above steps will only work with an image of the shipping label.  So, we need to tell our shipping provider to send us a Standard label rather than a Thermal label.  Here's how:


1.  Click on the Manage tab and then the Shipping Settings button.


OV564wSn1XX68Wgv3zX2w__k2aaNtVS9QQ.png


2.  On the Shipping Settings screen, select the shipping provider for which you wish to print the 4x8 inch labels.

Note: For this example we will be using FedEx.  The basics steps are the same for each shipping provider.


PdtSkRJHaQp9NiVALTUeZsBV9mE-Q5ycNg.png


3.  On the Settings tab, click on the blue link for Defaults - [provider name].


07qbSouiPNM0uhZmfpvHtTzONx1JEXJnsQ.png


4.  On the Shipping Profile screen scroll down, if needed, to the Labels section and select Standard as the Requested Label Format.  Then, click OK.


hw0IjotaC3IUmmqe_02KkfUnq5AN1BJgVA.png


tJiQgWHgM63qKjmR0HkveAZ8gJb3NGjAQQ.png


Set the Default Print Rule

Next, we need to tell ShipWorks to print the label using the template we created.


1.  Still on the Shipping Settings screen, click on the Printing tab.


EhAj3l71CsUu3jF7H6eRGHotpHssTfMSFg.png


2.  In the Labels section, change the rule Otherwise Always print with Standard to Otherwise Always print with Standard 4x8.


EsvEEeg2-MkJogNwPWT_3Zn53k2823zdbA.png


3.  Click the Close button.


Test Your Label

In order to see if your setup works, you will need to process a new label using the provider(s) you configured with your new 4" x 8" template.  You cannot just reprint a thermal (ZPL or EPL) formatted label as these will not work with your new template.


Your printed labels should look like:


For labels with a logo:


GwlsUl8FEIpWkoGXUNu_pwMUbiWop_6feA.png



Labels with Additional Information:


mFbDM9m1APKMVRmsNsjE3ffG_dbGRG-qnw.png


Still Need Help?

Please feel free to reach out to one of our awesome Customer Care Representatives in St. Louis.  We are happy to help.