Hiding bundle items from Order Printer Pro receipts and packing slips

Exclude bundle item details from your order printer pro packing slips and receipts

1. Navigate to the Order Printer Pro app and click on Manage templates tab.

2. Select the template you would like to modify and click on "Edit template".

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

for line_item in line_items

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

5. Once updated, your packing slip should exclude the 100% discounted bundle product items from your packing slips.

📝  Optional

If you currently have 100% discounted items that are not part of the bundle, then you should skip #4 above and use the code snippets below to remove the discounted bundle items only.

Add this line right before the {% for line_item in line_items %} loop shown above:

{% assign discount_application_titles = discount_applications | map: 'title' %}

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>

Removing bundle discount total in pricing summary

Some packing slip or invoice templates in Order Printer Pro will have discount reason and total when calculating the subtotal. Follow the steps below to remove this section for bundle discounts from Simple Bundles:

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

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 retrieve this code from this attached Github gist.

4. Once replaced, the template code should look like this:

5. Click save and your changes should remove bundle discounts from the subtotal calculation:

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

If you have any questions regarding Order Printer Pro templates, reach out to our team over chat or email.

Still need help? Contact Us Contact Us