add a user object to the checkout view
This commit is contained in:
parent
5b1530c0bd
commit
f36550e9d4
|
@ -3,7 +3,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>Preview your Purchase:</h3>
|
<h3>Preview your Purchase:</h3>
|
||||||
<h4>Shipping Address:</h4>
|
<h4>Shipping Address:</h4>
|
||||||
{% if user_list %}
|
{% if person %}
|
||||||
<p><b>Salutation: </b>{{ person.salutation }}</p>
|
<p><b>Salutation: </b>{{ person.salutation }}</p>
|
||||||
<p><b>Firstname: </b>{{ request.user.first_name }}</p>
|
<p><b>Firstname: </b>{{ request.user.first_name }}</p>
|
||||||
<p><b>Lastname: </b>{{ request.user.last_name }}</p>
|
<p><b>Lastname: </b>{{ request.user.last_name }}</p>
|
||||||
|
|
|
@ -405,6 +405,7 @@ def checkout(request):
|
||||||
|
|
||||||
checkout_form = CheckoutForm()
|
checkout_form = CheckoutForm()
|
||||||
registration_form = RegistrationForm()
|
registration_form = RegistrationForm()
|
||||||
|
person = Person.objects.get(user=request.user.id)
|
||||||
|
|
||||||
return render(request, 'webshop/cart.html',
|
return render(request, 'webshop/cart.html',
|
||||||
{'cart_position_list_zip': cart_position_list_zip,
|
{'cart_position_list_zip': cart_position_list_zip,
|
||||||
|
@ -418,4 +419,5 @@ def checkout(request):
|
||||||
'currency_name': currency_name,
|
'currency_name': currency_name,
|
||||||
'category_list': category_list,
|
'category_list': category_list,
|
||||||
'message': message,
|
'message': message,
|
||||||
|
'person': person
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue