Skip to content

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

Fix order detail layout

Marco Badan7798e8f4011d
diff --git a/saleor/static/scss/storefront/components/_order-details.scss b/saleor/static/scss/storefront/components/_order-details.scss
index 0fee7b042e..25d03350f0 100644
--- a/saleor/static/scss/storefront/components/_order-details.scss
+++ b/saleor/static/scss/storefront/components/_order-details.scss
@@ -7,12 +7,14 @@
}
&__table-header {
color: $gray;
- border-bottom: 1px solid $light-gray;
padding-bottom: $global-padding / 2;
margin-top: $global-margin * 2;
.col-md-3 {
text-align: right;
}
+ > .row {
+ border-bottom: 1px solid $light-gray;
+ }
}
&__table {
@include media-breakpoint-down(sm) {
@@ -32,17 +34,11 @@
text-decoration: none;
}
}
- .col-3 {
- padding: 0;
- }
.row {
padding: $global-padding / 2 0;
&:not(:last-of-type) {
border-bottom: 1px solid $light-gray;
}
}
- .total div {
- padding-right: 0;
- }
}
}
diff --git a/templates/order/order-details.html b/templates/order/order-details.html
index 41601e8fc3..5df9b0c024 100644
--- a/templates/order/order-details.html
+++ b/templates/order/order-details.html
@@ -6,30 +6,35 @@
{% if order.user == user %}
- <div class="row order-details__addresses">
- {% if order.is_shipping_required %}
- <div class="col-6">
- <h3>{% trans "Shipping address" %}</h3>
- <address>{% include "userprofile/snippets/address-short.html" with address=order.shipping_address %}</address>
- </div>
- {% endif %}
- <div class="col-6">
- <h3>{% trans "Billing address" %}</h3>
- <address>{% include "userprofile/snippets/address-short.html" with address=order.billing_address %}</address>
+ <div class="order-details__addresses">
+ <div class="row">
+ {% if order.is_shipping_required %}
+ <div class="col-6">
+ <h3>{% trans "Shipping address" %}</h3>
+ <address>{% include "userprofile/snippets/address-short.html" with address=order.shipping_address %}</address>
+ </div>
+ {% endif %}
+ <div class="col-6">
+ <h3>{% trans "Billing address" %}</h3>
+ <address>{% include "userprofile/snippets/address-short.html" with address=order.billing_address %}</address>
+ </div>
</div>
</div>
{% endif %}
-<div class="row order-details__table-header hidden-sm-down">
- <div class="col-md-6">
- <small>{% trans "Product" %}</small>
- </div>
- <div class="col-md-3">
- <small>{% trans "Quantity" %}</small>
- </div>
- <div class="col-md-3">
- <small>{% trans "Price" %}</small>
+<div class="order-details__table-header hidden-sm-down">
+ <div class="row">
+ <div class="col-md-6">
+ <small>{% trans "Product" %}</small>
+ </div>
+ <div class="col-md-3">
+ <small>{% trans "Quantity" %}</small>
+ </div>
+ <div class="col-md-3">
+ <small>{% trans "Price" %}</small>
+ </div>
</div>
</div>
+
<div class="order-details__table">
{% for item in order %}
{% for item_line in item %}
@@ -76,12 +81,16 @@
</div>
</div>
{% endif %}
- <div class="row total">
- <div class="col-8">
- <p><strong>{% trans "Total" %}</strong></p>
- </div>
- <div class="col-4">
- <p class="float-right"><strong>{% gross order.total %}</strong></p>
+ <div class="total">
+ <div class="row">
+ <div class="col-8">
+ <div class="total">
+ <p><strong>{% trans "Total" %}</strong></p>
+ </div>
+ </div>
+ <div class="col-4">
+ <p class="float-right"><strong>{% gross order.total %}</strong></p>
+ </div>
</div>
</div>
{% endfor %}