Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix calculating subtotal in e-mails

Anna Siwik7dcf42bf302c
diff --git a/templates/templated_email/html/compiled/order/confirm_order.html b/templates/templated_email/html/compiled/order/confirm_order.html
index c1c9946044..9f2c48891e 100644
--- a/templates/templated_email/html/compiled/order/confirm_order.html
+++ b/templates/templated_email/html/compiled/order/confirm_order.html
@@ -144,7 +144,7 @@
{% trans "Subtotal" context "E-mail order lines summary table" %}
</td>
<td style="padding: 5px; text-align: right;" align="right">
- {% gross order.get_total html=True %}
+ {% gross order.get_subtotal_without_voucher html=True %}
</td>
</tr>
<tr>
diff --git a/templates/templated_email/html/source/order/partials/_order_lines.mjml b/templates/templated_email/html/source/order/partials/_order_lines.mjml
index fd92a86e12..67c4ca8a6e 100644
--- a/templates/templated_email/html/source/order/partials/_order_lines.mjml
+++ b/templates/templated_email/html/source/order/partials/_order_lines.mjml
@@ -14,7 +14,7 @@
{% trans "Subtotal" context "E-mail order lines summary table" %}
</td>
<td style="text-align: right;">
- {% gross order.get_total html=True %}
+ {% gross order.get_subtotal_without_voucher html=True %}
</td>
</tr>
<tr>
diff --git a/templates/templated_email/order/confirm_order.email b/templates/templated_email/order/confirm_order.email
index 8fd6b650a6..b4bbd5235d 100644
--- a/templates/templated_email/order/confirm_order.email
+++ b/templates/templated_email/order/confirm_order.email
@@ -15,7 +15,7 @@ Thank you for your order. Below is the list of ordered products. To see your pay
{{ line.quantity }} x {{ line.product_name }}, {% gross line.get_total %}
{% endfor %}{% endfor %}
{% trans "Order summary" context "Order confirmation e-mail table header" %}:
-{% trans "Subtotal" context "Order confirmation e-mail table header" %}: {% gross order.get_total %}
+{% trans "Subtotal" context "Order confirmation e-mail table header" %}: {% gross order.get_subtotal_without_voucher %}
{% trans "Shipping" context "Order confirmation e-mail table header" %}: {% gross order.shipping_price %}
{% trans "Total" context "Order confirmation e-mail table header" %}: {% gross order.get_total %}