You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
4.1 KiB
83 lines
4.1 KiB
{% extends 'base.jinja' %}
|
|
{% block content %}
|
|
<div class=" breadcrumbs">
|
|
<ol class="breadcrumb breadcrumb-arrow">
|
|
<li><a href="/">Главная</a></li>
|
|
|
|
<li class="active"><span>Корзина</span></li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<h3>Корзина товаров</h3><br/>
|
|
|
|
{% if cart.items %}
|
|
|
|
<div class="panel panel-default">
|
|
<form action="" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
|
|
<table class="table table-hover table-cart ">
|
|
<thead>
|
|
<tr>
|
|
<th>Фото</th>
|
|
<th>Наименование</th>
|
|
<th>Цена за единицу</th>
|
|
<th>Количество</th>
|
|
<th>Итого</th>
|
|
<th>Действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in cart.items %}
|
|
<tr>
|
|
<td class="text-center">
|
|
{% set im = item.item.product.main_image()|thumbnail("80x80") %}
|
|
<a href="{{ item.item.product.get_absolute_url() }}"><img src="/static/{{ im.url }}"
|
|
alt=""
|
|
class="img-thumbnail"/></a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ item.item.product.get_absolute_url() }}">{{ item.item.product.title }}</a>
|
|
</td>
|
|
<td class="text-right">{{ item.item.price }} ₸</td>
|
|
<td class="text-right"><input type="number" value="{{ item.count }}"
|
|
name="{{ item.id }}" class="form-control col-xs-1"/>
|
|
|
|
</td>
|
|
<td class="text-right">{{ item.subtotal }} ₸</td>
|
|
<td class="text-center">
|
|
<a class="text-danger" href="/store/cart/remove/?id={{ item.id }}"><span
|
|
class="glyphicon glyphicon-remove"></span></a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="2" class="text-left table-cart-itogo"><a href="{{ request.GET['next'] }}" class="btn btn-warning">
|
|
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Продолжить покупки</a></th>
|
|
<th colspan="3" class="text-right table-cart-itogo">Итого: {{ cart.total }} ₸</th>
|
|
<th class="text-center">
|
|
<button type="submit" class="btn btn-primary"><span
|
|
class="glyphicon glyphicon-repeat"></span> Пересчитать
|
|
</button>
|
|
</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
{% else %}
|
|
<div class="alert alert-warning alert-dismissable">
|
|
<h4>Ваша корзина пуста</h4>
|
|
|
|
<p>Вы еще ничего не добавляли в корзину. Выберите товары и добавьте их в корзину для дальнейшего
|
|
оформления покупки.</p>
|
|
|
|
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a></p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|