Hiding bundle items from Order Printer Pro receipts and 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 bundle items from your Order Printer Pro packing slips and receipts, and to remove the bundle discount from the pricing summary.

Want to group bundle items under their bundle instead of hiding them? See 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. Open the Order Printer Pro app and click the Manage templates tab.
  2. Select the template you want to change and click Edit template.

    Order Printer Pro Manage templates tab with the Edit template button

  3. Scroll down to where the line item for loop begins. You can also search for:
for line_item in line_items

Template code with the line item for loop highlighted

  1. Right underneath the highlighted line, add the following code snippet. You can copy it from this Github gist.

Once updated, your packing slip excludes the 100% discounted bundle product items.

What if I have other 100% discounted items?

If you have 100% discounted items that are not part of a bundle, skip step 4 above. Use these snippets instead to remove only the discounted bundle items.

  1. Add this line right before the {% for line_item in line_items %} loop shown above:
{% assign discount_application_titles = discount_applications | map: 'title' %}
  1. Add this code snippet after the {% for line_item in line_items %} loop:
{% 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 %}<br>

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

Some packing slip or invoice templates in Order Printer Pro show the discount reason and total when calculating the subtotal. To remove this section for Simple Bundles discounts:

Packing slip pricing summary showing the Simple Bundles discount

  1. Go to the pricing section of the template. This is everything after the class="pricing" part of the template file.

    Pricing section of the template with the total_discounts block

  2. Highlight everything within the if total_discounts != 0.0 block, shown above.

  3. Replace the entire highlighted section with the following code. You can also get this code from this attached Github gist.

    Once replaced, the template code should look like this:

    Template pricing section after replacing the discount block

  4. Click Save. Bundle discounts are removed from the subtotal calculation.

    Pricing summary without the bundle discount line

If you have other non-bundle discounts on the order, these show up right before the subtotal:

Pricing summary showing a non-bundle discount above the subtotal

If you have any questions about Order Printer Pro templates, reach out to 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