Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make order details match checkout screen
Patryk Zawadzkifbdd3bda2909
diff --git a/saleor/checkout/templates/checkout/summary.html b/saleor/checkout/templates/checkout/summary.htmlindex 47708c01b0..1d3182286e 100644--- a/saleor/checkout/templates/checkout/summary.html+++ b/saleor/checkout/templates/checkout/summary.html@@ -11,7 +11,7 @@{% with total=checkout.get_total %}<p>{% trans "Order total" %}:- <strong>{% gross checkout.get_total %}</strong>+ <strong>{% gross total %}</strong>{% if total.tax %}({% blocktrans with tax=total.tax|floatformat:2 currency=total.currency %}includes {{ tax }} <span class="currency">{{ currency }}</span> tax{% endblocktrans %}){% endif %}diff --git a/saleor/order/templates/order/details.html b/saleor/order/templates/order/details.htmlindex aba3a587d3..41e5233827 100644--- a/saleor/order/templates/order/details.html+++ b/saleor/order/templates/order/details.html@@ -20,60 +20,86 @@{# so we don't show all details (like delivery address) #}{# unless current user is owner of the order. #}- {% if order.user == user %}- <h3>{% trans "Billing address" %}</h3>+ <div class="row">+ <div class="col-sm-6">+ <h3>{% trans "Order details" %}</h3>+ {% with total=order.get_total %}+ <p>+ {% trans "Order total" %}:+ <strong>{% gross total %}</strong>+ {% if total.tax %}+ ({% blocktrans with tax=total.tax|floatformat:2 currency=total.currency %}includes {{ tax }} <span class="currency">{{ currency }}</span> tax{% endblocktrans %})+ {% endif %}+ </p>+ {% endwith %}+ <p>{% trans "Status" %}: <span class="label label-default">{{ order.get_status_display }}</span></p>+ </div>+ {% if order.user == user %}+ <div class="col-sm-6">+ <div class="panel panel-default">+ <div class="panel-heading">+ {% trans "Billing address" %}+ </div>+ <div class="panel-body">+ <address>{% include "userprofile/snippets/address-details.html" with address=order.billing_address %}</address>+ </div>+ </div>+ </div>+ <h3></h3>+ {% endif %}+ </div>- <address>{% include "userprofile/snippets/address-details.html" with address=order.billing_address %}</address>- {% endif %}- <h3>{% trans "Order details" %}</h3>- <p>{% trans "Status" %}: <span class="label label-default">{{ order.get_status_display }}</span></p>- <table class="table table-striped">- <thead>- <tr>- <th class="col-sm-4">{% trans "Name" %}</th>- <th class="col-sm-2">{% trans "Price" %}</th>- <th class="col-sm-2">{% trans "Subotal" %}</th>- <th class="col-sm-2">{% trans "Shipping" %}</th>- <th class="col-sm-2">{% trans "Total" %}</th>- </tr>- </thead>- <tfoot>- <tr>- <td colspan="3" class="col-sm-8"></td>- <th class="col-sm-2">{% trans "Total" %}</th>- <td class="col-sm-2">{% gross order.get_total %}</td>- </tr>- </tfoot>- <tbody>{% for group in groups %}- {% for item in group %}- <tr>- <td class="col-sm-4">{{ item.product }}{% if item.quantity != 1 %} <em>×{{ item.quantity }}</em>{% endif %}</td>- <td class="col-sm-2">{% gross item.get_price_per_item %}</td>- <td class="col-sm-2">{% gross item.get_total %}</td>- {% if forloop.first %}- <td rowspan="{{ group.items.count }}" class="col-sm-2">- {% gross group.price %}- {% if order.user == user %}- {% if group.email %}- <p>{{ group.email }}</p>- {% elif group.address %}- <p>- {% include "userprofile/snippets/address-short.html" with address=group.address %}- </p>+ <div class="panel panel-default">+ <div class="panel-heading">+ {% blocktrans with number=forloop.counter %}Delivery group #{{ number }}{% endblocktrans %}+ </div>+ <div class="panel-body">+ <table class="table table-striped">+ <thead>+ <tr>+ <th class="col-sm-4">{% trans "Name" %}</th>+ <th class="col-sm-2">{% trans "Price" %}</th>+ <th class="col-sm-2">{% trans "Subtotal" %}</th>+ </tr>+ </thead>+ <tfoot>+ <tr>+ <th class="col-sm-4"></th>+ <th class="col-sm-2">{% trans "Total" %}</th>+ <th class="col-sm-2">{% gross group.get_total %}</th>+ </tr>+ </tfoot>+ <tbody>+ {% for item in group %}+ <tr>+ <td class="col-sm-4">{{ item.product }}{% if item.quantity != 1 %} <em>×{{ item.quantity }}</em>{% endif %}</td>+ <td class="col-sm-2">{% gross item.get_price_per_item %}</td>+ <td class="col-sm-2">{% gross item.get_total %}</td>+ </tr>+ {% endfor %}+ {% if group.price.gross %}+ <tr>+ <td class="col-sm-4">+ {% trans "Shipping" %} ({{ group.method }})+ </td>+ <td class="col-sm-2">{% gross group.price %}</td>+ <td class="col-sm-2">{% gross group.price %}</td>+ </tr>{% endif %}- <p>{% trans "Status" %}: <span class="label label-default">{{ group.get_status_display }}</span></p>+ </tbody>+ </table>+ {% if order.user == user %}+ {% if group.email %}+ <p>{% trans "Addressee" %}: {{ group.email }}</p>+ {% elif group.address %}+ <p>{% trans "Addressee" %}: {% include "userprofile/snippets/address-short.html" with address=group.address %}</p>{% endif %}- </td>- <td rowspan="{{ group.items.count }}" class="col-sm-2">- {% gross group.get_total %}- </td>- {% endif %}- </tr>- {% endfor %}+ <p>{% trans "Status" %}: <span class="label label-default">{{ group.get_status_display }}</span></p>+ {% endif %}+ </div>+ </div>{% endfor %}- </tbody>- </table>{% if order.user == user %}<h3>{% trans "Payment history" %}</h3><ul>