diff --git a/django/didgeridoo/webshop/forms.py b/django/didgeridoo/webshop/forms.py
index e762e45..7aada1f 100644
--- a/django/didgeridoo/webshop/forms.py
+++ b/django/didgeridoo/webshop/forms.py
@@ -74,7 +74,6 @@ class CartForm(forms.Form):
class CheckoutForm(forms.Form):
-
checkout = forms.BooleanField(
required=True,
label='Yes. I have read the General Terms and Conditions.')
diff --git a/django/didgeridoo/webshop/models.py b/django/didgeridoo/webshop/models.py
index 111f346..87b3b4c 100644
--- a/django/didgeridoo/webshop/models.py
+++ b/django/didgeridoo/webshop/models.py
@@ -84,7 +84,10 @@ class Order(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
status = models.ForeignKey(OrderStatus)
date = models.DateTimeField(default=timezone.now)
- exchange_rate = models.ForeignKey(ExchangeRate)
+ exchange_rate = models.ForeignKey(ExchangeRate, null=True)
+
+ def __str__(self):
+ return str(self.id)
class OrderPosition(models.Model):
diff --git a/django/didgeridoo/webshop/templates/webshop/base.html b/django/didgeridoo/webshop/templates/webshop/base.html
index 9f21839..94e473e 100644
--- a/django/didgeridoo/webshop/templates/webshop/base.html
+++ b/django/didgeridoo/webshop/templates/webshop/base.html
@@ -73,7 +73,7 @@
target='_blank'
href='http://www.ibz.ch'
>This is a case study project of Ivan Hörler and Andreas Zweili.
-
+
It is a school project/excercise and has no commercial intent.
diff --git a/django/didgeridoo/webshop/templates/webshop/checkout.html b/django/didgeridoo/webshop/templates/webshop/checkout.html
index 0802077..ad9c9ff 100644
--- a/django/didgeridoo/webshop/templates/webshop/checkout.html
+++ b/django/didgeridoo/webshop/templates/webshop/checkout.html
@@ -1,7 +1,8 @@
{% extends "webshop/base.html" %}
-{% block section_title %}
Salutation: {{ person.salutation }}
@@ -17,54 +18,64 @@ {% endif %} - {% if articles_list %} -POS. | ART# | NAME | STOCK | AMOUNT | -PRICE p.pce. | -POSITION PRICE | +PRICE p.pce. | +POSITION PRICE | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ article.id }} | -{{ article.article.id }} | +{{ cart_position.id }} | +{{ cart_position.article.id }} | - - {{ article.article.name }} + + {{ cart_position.article.name }} | -{{ article.article.stock }} | -- {{ article.amount }} - | -- {{ article.article.price_in_chf }} + | {{ cart_position.article.stock }} | +{{ cart_position.amount }} | ++ {{ cart_position.article.price_in_chf }} {{ currency_name }} | -{{ article.position_price }} {{ currency_name }} | ++ {{ cart_position.position_price }} {{ currency_name }} + | |
- Total: {{ total }} {{ currency_name }} + | + |
+
|
+
+
|
- Something whent wrong. Your cart is empty. + Your cart seamed to lack Items. + Go get some in the store!
{% endif %}{{ message }} - +
{% endblock %} diff --git a/django/didgeridoo/webshop/templates/webshop/nav.html b/django/didgeridoo/webshop/templates/webshop/nav.html index f65151f..6390f7b 100644 --- a/django/didgeridoo/webshop/templates/webshop/nav.html +++ b/django/didgeridoo/webshop/templates/webshop/nav.html @@ -20,7 +20,7 @@ {% csrf_token %} - {% endif %} + {% endif %} diff --git a/django/didgeridoo/webshop/templates/webshop/order.html b/django/didgeridoo/webshop/templates/webshop/order.html new file mode 100644 index 0000000..1ffcde5 --- /dev/null +++ b/django/didgeridoo/webshop/templates/webshop/order.html @@ -0,0 +1,7 @@ +{% extends "webshop/base.html" %} +{% load customfilters %} +{% block section_title %}Order{% endblock %} +{% block content %} +