Skip to content

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

Show only order content for unregistered users

weronkaf458fdf0bad4
diff --git a/saleor/static/scss/demo/components/_order-details.scss b/saleor/static/scss/demo/components/_order-details.scss
index e77dee0748..e22b24e3cd 100644
--- a/saleor/static/scss/demo/components/_order-details.scss
+++ b/saleor/static/scss/demo/components/_order-details.scss
@@ -1,6 +1,6 @@
.order-details {
&__header {
- margin-bottom: $global-margin * 2;
+ margin: $global-margin 0 $global-margin * 2;
}
&__table-header {
color: $gray;
@@ -31,4 +31,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/templates/order/details.html b/templates/order/details.html
index f9c4546654..5efb82e7af 100644
--- a/templates/order/details.html
+++ b/templates/order/details.html
@@ -8,19 +8,11 @@
{% block title %}{% trans "Order" %} {{ order }} — {{ block.super }}{% endblock %}
{% block breadcrumb %}
- {% if order.user == user %}
- <ul class="breadcrumbs list-unstyled">
- <li><a href="/">{% trans "Home" %}</a></li>
- <li><a href="{% url 'profile:details' %}">{% trans "Orders" %}</a></li>
- <li><a href="{{ order.get_absolute_url }}">{{ order }}</a></li>
- </ul>
- {% endif %}
{% endblock breadcrumb %}
{% block content %}
{# This view is available by just knowing url, #}
{# so we don't show all details (like delivery address) #}
- {# unless current user is owner of the order. #}
<div class="row order-details">
<div class="col-lg-10 offset-lg-1">
@@ -35,18 +27,6 @@
{% endif %}
{% endif %}
</h2>
- {% if order.user == user %}
- <div class="row">
- <div class="col-xs-6">
- <h3>{% trans "Shipping address" %}</h3>
- <address>{% include "userprofile/snippets/address-short.html" with address=order.shipping_address %}</address>
- </div>
- <div class="col-xs-6">
- <h3>{% trans "Billing address" %}</h3>
- <address>{% include "userprofile/snippets/address-short.html" with address=order.billing_address %}</address>
- </div>
- </div>
- {% endif %}
<div class="row order-details__table-header hidden-sm-down">
<div class="col-md-6">
<small>{% trans "Product" %}</small>