Skip to content

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

Add discount information on order summary page

Artur Smęt398b73b056fe
diff --git a/saleor/order/templates/order/details.html b/saleor/order/templates/order/details.html
index 47f3cde5ee..a6eab35c81 100644
--- a/saleor/order/templates/order/details.html
+++ b/saleor/order/templates/order/details.html
@@ -3,6 +3,7 @@
{% load gross from prices_i18n %}
{% load i18n %}
{% load staticfiles %}
+{% load discount_amount_for from prices %}
{% block title %}{% trans "Order" %} {{ order }} — {{ block.super }}{% endblock %}
@@ -108,4 +109,24 @@
</table>
</div>
{% endfor %}
+ {% if order.discount_amount %}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{ order.discount_name }}
+ </div>
+ <div class="panel-body text-right">
+ <strong>{% gross order.discount|discount_amount_for:order.total %}</strong>
+ </div>
+ </div>
+ {% endif %}
+ {% if order.discount_amount or groups|length > 1 %}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {% trans "Total" %}
+ </div>
+ <div class="panel-body text-right">
+ <strong>{% gross order.total %}</strong>
+ </div>
+ </div>
+ {% endif %}
{% endblock content %}