Include total discount on "new order" email notification

Topic summary

Goal: Add a “total savings” line to Shopify’s internal New Order notification email under the subtotal.

  • Problem: Using the Liquid variable discount_application.total_allocated_amount displays the “Discounts” label but no value. The user referenced Shopify’s email variables docs and included a screenshot (not essential to the solution).

  • Key detail: Shopify Liquid (templating language) may require iterating because an order can have multiple discount applications, and values are accessed within that context.

  • Proposed solution: Loop through order.discount_applications and render each discount’s title and total_allocated_amount, e.g.

    • {% for discount in order.discount_applications %}
      • {{ discount.title }}
      • {{ discount.total_allocated_amount | money }}
      • {% endfor %}
  • Rationale: Ensures values are pulled from each discount application rather than a single variable outside the proper scope.

  • Status: No confirmation from the original poster; outcome unresolved/ongoing.

Summarized with AI on January 23. AI used: gpt-5.

I’m working to edit the internal “new order” notification email that is sent from Shopify when an order is placed. Beneath the subtotal line I need to include a line displaying the total savings applied to the order.

I’ve reviewed Shopify’s guidelines on Liquid variables found here: https://help.shopify.com/en/manual/orders/notifications/email-variables#discounts and found that the discount_application.total_allocated_amount variable should accomplish what I’m needing. However when adding it in a table row, the “Discounts” title is displayed but the value is not (see screenshot below)

Current code is below:


  
    

      Discounts
    

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

Any ideas on what I might be missing?

Hi JMSarten,

You may need to wrap your code in a for loop that will check for all discounts (as there could be multiple). In the doc you’ve linked you’ll see an example of this where there’s the code for returning discount data is wrapped in:

{% for discount_allocation in line.discount_allocations %} ... {% endfor %}

In your case you’ll need to use something like:

{% for discount in order.discount_applications %}

  
    

      {{ discount.title }}
    

  
  
    **{{ discount.total_allocated_amount | money }}**
  

{% endfor %}

Try out this approach and let us know if it’s not working for you.

Hope this helps,