Include active Shipping Discount in order confirmation mail

Topic summary

A merchant is experiencing an issue where order confirmation emails display regular shipping rates even when a shipping discount code is active. Customers can only verify the discount by manually comparing product totals with the final order amount, creating confusion.

Current Problem:

  • Shipping discounts don’t appear in confirmation emails
  • No clear indication that a discount was applied
  • Initial attempts using discount_application or discount_allocation variables were unsuccessful

Proposed Solution:
One user suggests manually looping through discount applications and filtering for automatic discounts using Liquid code:

{% for discount_application in discount_applications %}
{% if discount_application.type == 'automatic' %}

This would display the discount title and allocated amount in the email template.

Additional Context:
Another user references a related bug (with screenshot), suggesting this may be a platform-level issue requiring attention.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hello,

we have a shipping discount code active for this month but the order confirmation mails still display the regular shipping rate and the only way for the customer to confirm that no shipping has been charged is by comparing the total amount of the products with the total order amount. This is rather confusing and we would really like to at least include the applied shipping discount in the conformation mail (as it doesnt seem one could get the shipping cost display to change depending on wether a code has been aplied or not). I tried to get anything to show via discount_application or discount_allocation but did not get it to work.

So Im looking for a way to include the information that a shipping discount has been applied or even better, the actual applied value of that discount in the order confirmation email.

Thanks in advance!

Please take a look at this bug!!!

If anyone is looking for a solution you have to include manually a loop for all discounts with type == ‘automatic’.
Something like this:

{% for discount_application in discount_applications %}
{% if discount_application.type == 'automatic' %}
{% capture discount_title %}
{% if discount_application.title %}
{{ discount_application.title | upcase }}
{% else %}
Sconto
{% endif %}
{% endcapture %}

{{ discount_title }}

**-{{ discount_application.total_allocated_amount | money }}**

{% endif %}
{% endfor %}

Hope this helps :wink: