2018-02-18 21:58:46 +01:00
|
|
|
{% extends "webshop/base.html" %}
|
2018-02-27 18:21:34 +01:00
|
|
|
{% block section_title %}CHECKOUT{% endblock %}
|
2018-02-18 21:58:46 +01:00
|
|
|
{% block content %}
|
2018-02-25 13:12:13 +01:00
|
|
|
<h3>Preview your Purchase:</h3>
|
2018-02-27 18:21:34 +01:00
|
|
|
<br>
|
2018-02-25 13:12:13 +01:00
|
|
|
<h4>Shipping Address:</h4>
|
2018-02-25 14:20:59 +01:00
|
|
|
{% if person %}
|
2018-02-25 13:12:13 +01:00
|
|
|
<p><b>Salutation: </b>{{ person.salutation }}</p>
|
|
|
|
<p><b>Firstname: </b>{{ request.user.first_name }}</p>
|
|
|
|
<p><b>Lastname: </b>{{ request.user.last_name }}</p>
|
|
|
|
<p><b>Street: </b>{{ person.street_name }}</p>
|
|
|
|
<p><b>Streetnumber: </b>{{ person.street_number }}</p>
|
|
|
|
<p><b>City: </b>{{ person.city }}</p>
|
|
|
|
{% else %}
|
|
|
|
<p class="alert alert-danger">
|
|
|
|
<strong>
|
|
|
|
Something whent wrong. Your User is incomplete.
|
|
|
|
<strong>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2018-02-26 19:56:45 +01:00
|
|
|
{% if cart_position_list %}
|
2018-02-27 18:21:34 +01:00
|
|
|
<br>
|
2018-02-26 19:56:45 +01:00
|
|
|
<h4>Your Items:</h4>
|
|
|
|
<table class="table price-table">
|
2018-02-18 21:58:46 +01:00
|
|
|
<tr class="table_header">
|
|
|
|
<th scope="col">POS.</th>
|
|
|
|
<th scope="col">ART#</th>
|
|
|
|
<th scope="col">NAME</th>
|
|
|
|
<th scope="col">STOCK</th>
|
|
|
|
<th scope="col">AMOUNT</th>
|
2018-02-26 19:56:45 +01:00
|
|
|
<th scope="col" class="price-label">PRICE p.pce.</th>
|
|
|
|
<th scope="col" class="price-label">POSITION PRICE</th>
|
2018-02-18 21:58:46 +01:00
|
|
|
</tr>
|
2018-02-26 19:56:45 +01:00
|
|
|
{% for cart_position in cart_position_list %}
|
2018-02-18 21:58:46 +01:00
|
|
|
<tr class="table_content">
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col">{{ cart_position.id }}</td>
|
|
|
|
<td scope="col">{{ cart_position.article.id }}</td>
|
2018-02-18 21:58:46 +01:00
|
|
|
<td scope="col">
|
2018-02-26 19:56:45 +01:00
|
|
|
<a href="{% url 'details' cart_position.article.id %}">
|
|
|
|
{{ cart_position.article.name }}
|
2018-02-18 21:58:46 +01:00
|
|
|
</a>
|
|
|
|
</td>
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col">{{ cart_position.article.stock }}</td>
|
2018-02-26 21:53:21 +01:00
|
|
|
<td scope="col">{{ cart_position.amount }}</td>
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col" class="price-value">
|
|
|
|
{{ cart_position.article.price_in_chf }}
|
2018-02-18 21:58:46 +01:00
|
|
|
{{ currency_name }}
|
|
|
|
</td>
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col" class="price-value">
|
|
|
|
{{ cart_position.position_price }} {{ currency_name }}
|
|
|
|
</td>
|
2018-02-18 21:58:46 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
<tr>
|
2018-02-27 18:21:34 +01:00
|
|
|
<td scope="col" colspan="5" class="text-right">
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col" class="price-value">
|
2018-02-27 18:21:34 +01:00
|
|
|
<dt><dl>Total:</dl></dt></td>
|
2018-02-26 19:56:45 +01:00
|
|
|
<td scope="col" class="price-value">
|
2018-02-27 18:21:34 +01:00
|
|
|
<dt><dl>{{ total }} {{ currency_name }}</dl></dt>
|
2018-02-18 21:58:46 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2018-02-27 22:16:24 +01:00
|
|
|
<form id="checkout_form" action="{% url 'cart' %}" method="POST">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="submit" value="Cancel" class="btn btn-warning" role="button"/>
|
|
|
|
</form>
|
|
|
|
</br>
|
2018-02-27 18:21:34 +01:00
|
|
|
<form id="checkout_form" action="" method="POST">
|
2018-02-26 19:56:45 +01:00
|
|
|
{% csrf_token %}
|
|
|
|
{{ checkout_form.as_p }}
|
|
|
|
<input type="submit" value="Order" class="btn btn-success" role="button"/>
|
|
|
|
</form>
|
2018-02-18 21:58:46 +01:00
|
|
|
{% else %}
|
|
|
|
<p class="alert alert-danger">
|
|
|
|
<strong>
|
2018-02-26 19:56:45 +01:00
|
|
|
Your cart seamed to lack Items.
|
|
|
|
Go get some in the store!
|
2018-02-18 21:58:46 +01:00
|
|
|
<strong>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
<p class="alert text-danger">
|
|
|
|
<strong>
|
|
|
|
{{ message }}
|
2018-02-27 18:21:34 +01:00
|
|
|
</strong>
|
2018-02-18 21:58:46 +01:00
|
|
|
</p>
|
|
|
|
{% endblock %}
|