Modifying Packing Slips or Invoices to Pull from the Product Catalog
By default, ShipWorks packing slips and invoice templates include order and item information sent to ShipWorks from the online store, marketplace, or imported from a custom import source. This includes product information such as the SKU, item location, item description and more.
When importing your products into the ShipWorks Product Catalog, it is possible to modify packing slip and invoice templates so that they display information from the Product Catalog. This is useful when keeping track of SKUs, product locations and other product information within ShipWorks.
This article will guide you through modifying a packing slip or invoice template so that it pulls item information from the Product Catalog. We will also look at how to add a column to the template that shows the item location as listed in the Product Catalog.
In order to modify templates, please log into ShipWorks as a user with create, edit, and delete template rights or as an administrator.
This article will modify the Single Scan packing slip template. However, the steps can be used to modify any packing slip or invoice template.
Let's first make a copy of the template that you intend to modify so that, in the even something goes wrong, you have your original template to fall back on. Here's how:
2. Locate and select the template you intend to modify. Then, click the Copy button and then OK. (For this example we are making a copy of the Single Scan packing slip.)
You will now see that you have a copy of your template and that the copy is selected.
Next, let's select the original template and make the necessary modifications.
Tip
If at any point you think you may have made a mistake, you can always click the Cancel button in the template editor. This will allow you to NOT save your changes and to begin modifying the template again.
1. Select the template to which you wish to make modifications. Then, click the Edit button.
You are now in the Template Editor and on the Code tab. This is where you will be making changes.
By default, the template pulls item information stored with the order. It does not pull information from items that you have stored in the ShipWorks Product Catalog. Let's change the template so that it looks to the Product Catalog for its information.
1. Still on the Code tab in the Template Editor, scroll down to approximately line 198. This line number may be different depending on the invoice or packing slip template you are modifying. You'll know you are in the right place when you locate this line of code:
<xsl:for-each select="$order/Item">
That's the line of code we are going to change.
2. Add /Product right after the word Item and before the " so that the line now reads exactly like this:
<xsl:for-each select="$order/Item/Product">
There is one more minor change we need to make so that the item quantity from the order still shows correctly. Here's how.
1. Locate approximately line 231 in the code. It will look like this:
2. Modify the line of code by adding ../ just after the first quotation mark and right before the word Quantity. The line should look like this:
Since many times packing slips and invoices are used to pick products for a shipment, let's take a look at how to quickly add a column to the template for the item location.
1. Locate approximately line 193 of the template code. You are looking for a group of code that looks like this:
2. Select this line of code: <td style="{$orderDetailHeaderStyle};">Name</td>. Then, right click on the selected code and select Copy.
3. Now, place your cursor at the end of the same line of code and press Enter to make a new line below it. Then in the new, blank line right-click and select Paste.
You now have a duplicate of the line you copied.
4. Modify the line of code that you just pasted so that the word Name is changed to Location like this:
When you are finished with step 4, click on the Preview tab in the Template Editor. You should see that there is a new column called Location. There won't be any data in the column, yet. We will add that next.
Switch back to the Code tab.
1. Locate approximately line 224 on the Code tab. You are looking for this highlighted group of code: (see screenshot)
2. Select the group of code you see highlighted in step 1 above. (In our example above, lines 224, 225 and 226 are selected). Then, right-click on the selected code and select Copy.
3. Place your cursor after the last line of the code, </td>, and press the Enter key to move to the next line.
4. Right click in the new line and select Paste to paste the copied code. You will then have a duplicate of the code block you copied in the previous step.
5. In the code you just pasted, modify the code so that the word Name is changed to the word Location.
Switch back to the Preview tab. You should now see that the Location column is now populated with the location information from your Product Catalog.
Be sure to click the SAVE button to save your work.
That's it. Your template is now pulling product information from the items stored in the ShipWorks Product Catalog. This is great because when you add items to or modify items in the Product Catalog, the changes will automatically be reflected on your template.
Still Need Help?
Please feel free to reach out to one of our awesome Technical Support Representatives in St. Louis. We are happy to help.
Have a comment to share about this article? We'd love to hear from you. You must be logged in to your Support Portal account to leave a comment.
Comments
0 comments