Hiding bundle items from Order Printer Pro receipts and packing slips

This article applies to Simple Bundles 1.0. If you're using Simple Bundles 2.0, refer to How to show itemized bundle contents using Order Printer Pro packing slips.

In Simple Bundles 1.0, bundle items are added to orders as 100% discounted line items. Use the code snippets below to hide those items from your Order Printer Pro packing slips and receipts, and to remove the bundle discount from the pricing summary.

To group bundle items under their bundle instead of hiding them, use the template in How to show itemized bundle contents using Order Printer Pro packing slips. That template works on Simple Bundles 1.0 and 2.0.

How do I hide bundle items from Order Printer Pro packing slips?

  1. In Order Printer Pro, go to the Manage templates page.
  2. Click Edit template next to the template you want to change.
Order Printer Pro Manage templates tab with the Edit template button
Manage templates in Order Printer Pro
  1. Scroll to where the line item for loop begins, or search the template for:
for line_item in line_items
Template code with the line item for loop highlighted
The line item for loop
  1. Directly below that line, paste the snippet below. You can also copy it from this GitHub Gist.
  1. Click Save.

Your packing slip now leaves out the 100% discounted bundle items.

What if I have other 100% discounted items?

The snippet in step 4 hides every 100% discounted item, including free items that aren't part of a bundle. To hide only bundle items, skip step 4 and use these snippets instead. They check for the Simple Bundles: discount title that the app adds to bundle items.

  1. Add this line right before the {% for line_item in line_items %} loop:
{% assign discount_application_titles = discount_applications | map: 'title' %}
  1. Add this snippet right after the {% for line_item in line_items %} line:
{% assign line_item_is_bundle_item = false %}
{% assign bundle_item_total = 0 %}
{% for discount_allocation in line_item.discount_allocations %}
  {% if discount_application_titles[discount_allocation.discount_application_index] contains "Simple Bundles: " %}
    {% assign line_item_is_bundle_item = true %}
    {% assign total_line_price = line_item.original_price | times: line_item.quantity %}
    {% assign bundle_item_total = bundle_item_total | plus: total_line_price %}

    {% continue %}
  {% endif %}
{% endfor %}
{% if line_item_is_bundle_item %}
  {% continue %}
{% endif %}

How do I remove the bundle discount from the pricing summary?

Some Order Printer Pro packing slip and invoice templates show the discount reason and total when calculating the subtotal. To remove the Simple Bundles discount from that section:

Packing slip pricing summary showing the Simple Bundles discount
Pricing summary with the bundle discount
  1. Go to the pricing section of the template. This is everything after class="pricing" in the template file.
Pricing section of the template with the total_discounts block
The total_discounts block in the pricing section
  1. Select everything inside the if total_discounts != 0.0 block shown above.
  2. Replace the selected code with the code below. You can also copy it from this GitHub Gist.

After you replace it, the template code looks like this:

Template pricing section after replacing the discount block
Pricing section after the change
  1. Click Save. Bundle discounts no longer appear in the subtotal calculation.
Pricing summary without the bundle discount line
Pricing summary without the bundle discount

Other, non-bundle discounts on the order still show right before the subtotal:

Pricing summary showing a non-bundle discount above the subtotal
Non-bundle discount above the subtotal

If you have questions about Order Printer Pro templates, contact our team over chat or email.

How to show itemized bundle contents using Order Printer Pro packing slips

Hiding bundles from Shopify packing slips

Merging line item quantities with the same SKU on packing slips

Still need help? Contact Us Contact Us