improved the table styleing
This commit is contained in:
parent
e4a58c48fd
commit
2c52c2483a
|
@ -3,15 +3,15 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>List of Items in your Shopping Cart:</h3>
|
<h3>List of Items in your Shopping Cart:</h3>
|
||||||
{% if cart_position_list_zip %}
|
{% if cart_position_list_zip %}
|
||||||
<table class="table">
|
<table class="table price-table">
|
||||||
<tr class="table_header">
|
<tr class="table_header">
|
||||||
<th scope="col">POS.</th>
|
<th scope="col">POS.</th>
|
||||||
<th scope="col">ART#</th>
|
<th scope="col">ART#</th>
|
||||||
<th scope="col">NAME</th>
|
<th scope="col">NAME</th>
|
||||||
<th scope="col">STOCK</th>
|
<th scope="col">STOCK</th>
|
||||||
<th scope="col">AMOUNT</th>
|
<th scope="col">AMOUNT</th>
|
||||||
<th scope="col">PRICE p.pce.</th>
|
<th scope="col" class="price-label">PRICE p.pce.</th>
|
||||||
<th scope="col">POSITION PRICE</th>
|
<th scope="col" class="price-label">POSITION PRICE</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for cart_position, amount_form in cart_position_list_zip %}
|
{% for cart_position, amount_form in cart_position_list_zip %}
|
||||||
<tr class="table_content">
|
<tr class="table_content">
|
||||||
|
@ -33,16 +33,21 @@
|
||||||
</form>
|
</form>
|
||||||
<!-- {{ article.amount }} -->
|
<!-- {{ article.amount }} -->
|
||||||
</td>
|
</td>
|
||||||
<td scope="col">
|
<td scope="col" class="price-value">
|
||||||
{{ cart_position.article.price_in_chf }}
|
{{ cart_position.article.price_in_chf }}
|
||||||
{{ currency_name }}
|
{{ currency_name }}
|
||||||
</td>
|
</td>
|
||||||
<td scope="col">{{ cart_position.position_price }} {{ currency_name }}</td>
|
<td scope="col" class="price-value">
|
||||||
|
{{ cart_position.position_price }} {{ currency_name }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<tr>
|
<tr>
|
||||||
<td scope="col" colspan="7" class="text-right">
|
<td scope="col" colspan="5"class="text-right">
|
||||||
Total: {{ total }} {{ currency_name }}
|
<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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -286,6 +286,7 @@ def cart(request):
|
||||||
)
|
)
|
||||||
cart_position.calculate_position_price()
|
cart_position.calculate_position_price()
|
||||||
totalprice_list.append(cart_position.position_price)
|
totalprice_list.append(cart_position.position_price)
|
||||||
|
print('totalprice_list', totalprice_list)
|
||||||
amount_form = CartForm(
|
amount_form = CartForm(
|
||||||
initial={'amount_form': cart_position.amount}
|
initial={'amount_form': cart_position.amount}
|
||||||
)
|
)
|
||||||
|
@ -380,11 +381,6 @@ def checkout(request):
|
||||||
cart_position_list = list(cart_positions)
|
cart_position_list = list(cart_positions)
|
||||||
# enumerate the list of articles and loop over items:
|
# enumerate the list of articles and loop over items:
|
||||||
for idx, cart_position in enumerate(cart_position_list):
|
for idx, cart_position in enumerate(cart_position_list):
|
||||||
# *************************************************
|
|
||||||
# !!! here i don't understand how its intended
|
|
||||||
# to use the utils function.
|
|
||||||
# cart_position = process_article_prices(request, cart_position)
|
|
||||||
# *************************************************
|
|
||||||
# scrap out the details to calculate Total of item and Summ of All:
|
# scrap out the details to calculate Total of item and Summ of All:
|
||||||
if currency:
|
if currency:
|
||||||
# get currencyname to display:
|
# get currencyname to display:
|
||||||
|
|
Loading…
Reference in New Issue