Merging line item quantities with the same SKU on packing slips

In Simple Bundles 1.0, the same SKU can show up on several lines of a packing slip when it's in more than one bundle. To merge line items with the same SKU into one line with the total quantity, replace the line item code in your Shopify packing slip template with the Liquid snippet below.

Using Simple Bundles 2.0? See Show itemized bundles items on Simple Bundles 2.0 using Shopify packing slips.

Note: All products in orders (both bundle and non-bundle items) must have a SKU for this packing slip template edit to work.

How do I merge same-SKU line items on Shopify packing slips?

  1. In Shopify, go to Settings and click Shipping and delivery.

    Shipping and delivery in the Shopify Settings menu

  2. Scroll down to the Documents section and click Packing slip template.

    Packing slip template in the Documents section of Shipping and delivery settings

  3. Find the line of code shown below and replace it with the code from the GitHub Gist.

    Line of packing slip template code to replace

    You can find the code snippet here: Github Gist

    Packing slip template with the merge snippet pasted in

    In the line item list for loop, replace all instances of:

    • line_item.shipping_quantity with total_shipping_quantity
    • line_item.quantity with total_quantity

      Before:

      Line item loop before replacing the quantity variables

      After:

      Line item loop after replacing them with total_shipping_quantity and total_quantity

Once you've added all the edits to the template, line items with the same SKU are merged.

What does the packing slip look like after the edit?

Packing slip before edits

Packing slip listing the same SKU on separate lines

Packing slip after edits

Packing slip with same-SKU items merged into one line with the total quantity

Can I use this snippet in other packing slip apps?

Yes. You can also use this snippet in Shopify Order Printer or Order Printer Pro, as long as line_items_in_shipment has been modified based on the templates being used.

Hiding bundles from Shopify packing slips

Hiding bundle items from Order Printer Pro receipts and packing slips

Show itemized bundles items on Simple Bundles 2.0 using Shopify packing slips

Still need help? Contact Us Contact Us