Skip to content

Instantly share code, notes, and snippets.

@basilkhan05
Last active March 10, 2022 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basilkhan05/cd163f296f4acc1d1078fabbb7024ff4 to your computer and use it in GitHub Desktop.
Save basilkhan05/cd163f296f4acc1d1078fabbb7024ff4 to your computer and use it in GitHub Desktop.
Remove discounts section for bundles in Order Printer Pro packing slips and invoices
{% assign total_discount_amount = total_discounts | minus: bundle_item_total %}
{% for discount_application in discount_applications %}
{% if discount_application.title contains "Simple Bundles:" %}{% continue %}{% endif %}
{% assign non_bundle_discount_amount = non_bundle_discount_amount | plus: discount_application.value %}
{% endfor %}
{% assign total_discount_amount = non_bundle_discount_amount %}
{% if total_discount_amount != 0.0 %}
<div class="pricing-row text-align-right">
<div class="pricing-title">
{{ TEXT_discount }}<br>
{% for discount_application in discount_applications %}
{% if discount_application.title contains "Simple Bundles:" %}{% continue %}{% endif %}
{% if forloop.last == true %}
{{ discount_application.title }}
{% else %}
{{ discount_application.title }},
{% endif %}
{% endfor %}
</div>
<div class="pricing-details">
-{{ total_discount_amount | money }}
</div>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment