2018-02-04 18:32:54 +01:00
|
|
|
{% extends "webshop/base.html" %}
|
2018-02-19 21:04:03 +01:00
|
|
|
{% block section_title %}Cart{% endblock %}
|
2018-02-04 18:32:54 +01:00
|
|
|
{% block content %}
|
|
|
|
<h3>List of Items in your Shopping Cart:</h3>
|
2018-02-21 21:11:07 +01:00
|
|
|
{% if cart_position_list_zip %}
|
2018-02-25 19:26:26 +01:00
|
|
|
<table class="table price-table">
|
2018-02-04 19:58:17 +01:00
|
|
|
<tr class="table_header">
|
2018-02-11 18:19:21 +01:00
|
|
|
<th scope="col">POS.</th>
|
|
|
|
<th scope="col">ART#</th>
|
2018-02-04 19:58:17 +01:00
|
|
|
<th scope="col">NAME</th>
|
|
|
|
<th scope="col">STOCK</th>
|
2018-02-04 20:18:49 +01:00
|
|
|
<th scope="col">AMOUNT</th>
|
2018-02-25 19:26:26 +01:00
|
|
|
<th scope="col" class="price-label">PRICE p.pce.</th>
|
|
|
|
<th scope="col" class="price-label">POSITION PRICE</th>
|
2018-02-04 19:58:17 +01:00
|
|
|
</tr>
|
2018-02-21 08:04:47 +01:00
|
|
|
{% for cart_position, amount_form in cart_position_list_zip %}
|
2018-02-04 19:58:17 +01:00
|
|
|
<tr class="table_content">
|
2018-02-18 21:58:46 +01:00
|
|
|
<td scope="col">{{ cart_position.id }}</td>
|
|
|
|
<td scope="col">{{ cart_position.article.id }}</td>
|
2018-02-04 19:58:17 +01:00
|
|
|
<td scope="col">
|
2018-02-18 21:58:46 +01:00
|
|
|
<a href="{% url 'details' cart_position.article.id %}">
|
|
|
|
{{ cart_position.article.name }}
|
2018-02-04 21:48:29 +01:00
|
|
|
</a>
|
|
|
|
</td>
|
2018-02-18 21:58:46 +01:00
|
|
|
<td scope="col">{{ cart_position.article.stock }}</td>
|
2018-02-17 10:51:32 +01:00
|
|
|
<td scope="col">
|
2018-02-19 19:11:40 +01:00
|
|
|
<form id="amount_form" action="" method="POST" novalidate>
|
|
|
|
{{ amount_form.as_p }}
|
2018-02-19 22:58:25 +01:00
|
|
|
<input type="hidden" value="{{ cart_position.article.id }}" name="article_id">
|
2018-02-17 10:51:32 +01:00
|
|
|
<input type="submit" value="change" />
|
2018-02-21 21:59:50 +01:00
|
|
|
<input type="submit" value="delete" name="delete" />
|
2018-02-17 10:51:32 +01:00
|
|
|
{% csrf_token %}
|
|
|
|
</form>
|
|
|
|
<!-- {{ article.amount }} -->
|
|
|
|
</td>
|
2018-02-25 19:26:26 +01:00
|
|
|
<td scope="col" class="price-value">
|
2018-02-18 21:58:46 +01:00
|
|
|
{{ cart_position.article.price_in_chf }}
|
2018-02-04 21:48:29 +01:00
|
|
|
{{ currency_name }}
|
|
|
|
</td>
|
2018-02-25 19:26:26 +01:00
|
|
|
<td scope="col" class="price-value">
|
|
|
|
{{ cart_position.position_price }} {{ currency_name }}
|
|
|
|
</td>
|
2018-02-04 19:58:17 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2018-02-04 21:48:29 +01:00
|
|
|
<tr>
|
2018-02-25 19:26:26 +01:00
|
|
|
<td scope="col" colspan="5"class="text-right">
|
|
|
|
<td scope="col" class="price-value">
|
|
|
|
<dl><dt>Total:</dl></dt></td>
|
|
|
|
<td scope="col" class="price-value">
|
|
|
|
<dl><dt>{{ total }} {{ currency_name }}</dl></dt>
|
2018-02-04 21:48:29 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
2018-02-04 19:58:17 +01:00
|
|
|
</table>
|
2018-02-25 13:12:13 +01:00
|
|
|
<a href="{% url 'checkout' %}" class="btn btn-primary" role="button">
|
|
|
|
CHECKOUT
|
|
|
|
</a>
|
2018-02-04 19:58:17 +01:00
|
|
|
{% else %}
|
2018-02-17 10:51:32 +01:00
|
|
|
<p class="alert alert-danger">
|
|
|
|
<strong>
|
|
|
|
This cart seams to lack some Items.
|
|
|
|
Go get some in the store!
|
|
|
|
<strong>
|
2018-02-04 19:58:17 +01:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
2018-02-17 10:51:32 +01:00
|
|
|
<p class="alert text-danger">
|
|
|
|
<strong>
|
|
|
|
{{ message }}
|
|
|
|
<strong>
|
|
|
|
</p>
|
2018-02-04 18:32:54 +01:00
|
|
|
{% endblock %}
|