diff --git a/src/shop/templates/shop_base.html b/src/shop/templates/shop_base.html index d7b8b0a3..58b19058 100644 --- a/src/shop/templates/shop_base.html +++ b/src/shop/templates/shop_base.html @@ -16,21 +16,14 @@ {% if user.creditnotes.exists %}
  • Credit Notes
  • {% endif %} -
  • Orders
  • + {% if current_order %}
  • - - {% if current_order and current_order.get_number_of_items %} - {% endif %} - - - - {{ current_order.get_number_of_items|default:0 }} - - {% if current_order and current_order.get_number_of_items %} - - {% endif %} + Shopping Cart ({{ current_order.get_number_of_items|default:0 }} items)
  • + {% else %} +
  • Show Orders
  • + {% endif %} {% endif %} diff --git a/src/shop/views.py b/src/shop/views.py index 36515079..62f08f00 100644 --- a/src/shop/views.py +++ b/src/shop/views.py @@ -249,9 +249,7 @@ class ProductDetailView(FormView, DetailView): return super(ProductDetailView, self).form_valid(form) def get_success_url(self): - return Order.objects.get( - user=self.request.user, open__isnull=False - ).get_absolute_url() + return reverse("shop:index") class OrderListView(LoginRequiredMixin, ListView):