|
|
|
@ -7,18 +7,21 @@ |
|
|
|
{% load mptt_tags %} |
|
|
|
{% load mptt_tags %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block breadcrums %} |
|
|
|
{% block breadcrumbs %} |
|
|
|
|
|
|
|
{% breadcrumb_url 'Главная страница' 'index:index' %} |
|
|
|
{% breadcrumb_url 'Каталог' 'products:product_list' %} |
|
|
|
{% breadcrumb_url 'Каталог' 'products:product_list' %} |
|
|
|
{% if the_product_category.get_ancestors.exists %} |
|
|
|
{% if the_product_category %} |
|
|
|
{% recursetree the_product_category.get_ancestors %} |
|
|
|
{% if the_product_category.get_ancestors.exists %} |
|
|
|
<li><a href="{{ node.get_absolute_url }}">{{ node.name }}</a></li> |
|
|
|
{% recursetree the_product_category.get_ancestors %} |
|
|
|
{% if not node.is_leaf_node %} |
|
|
|
<li><a href="{{ node.get_absolute_url }}">{{ node.name }}</a></li> |
|
|
|
{{ children }} |
|
|
|
{% if not node.is_leaf_node %} |
|
|
|
{% endif %} |
|
|
|
{{ children }} |
|
|
|
{% endrecursetree %} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% endrecursetree %} |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% breadcrumb_url the_product_category.name 'products:product_list' the_product_category.get_path %} |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
{% breadcrumb_url the_product_category.name 'products:product_list' the_product_category.get_path %} |
|
|
|
{% endblock breadcrumbs %} |
|
|
|
{% endblock breadcrums %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block extra_left_menu_items %} |
|
|
|
{% block extra_left_menu_items %} |
|
|
|
{% if left_product_filter_formset %} |
|
|
|
{% if left_product_filter_formset %} |
|
|
|
@ -54,109 +57,112 @@ |
|
|
|
{% crispy product_sort_form %} |
|
|
|
{% crispy product_sort_form %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="catalog"> |
|
|
|
<div class="catalog"> |
|
|
|
{% for product in object_list %} |
|
|
|
{% for product in object_list %} |
|
|
|
<div class="catalog__item"> |
|
|
|
<div class="catalog__item"> |
|
|
|
|
|
|
|
|
|
|
|
<div class="catalog__information"> |
|
|
|
<div class="catalog__information"> |
|
|
|
{% if product.productimage_set.get_default_image %} |
|
|
|
{% if product.productimage_set.get_default_image %} |
|
|
|
<div class="catalog__image"> |
|
|
|
<div class="catalog__image"> |
|
|
|
<img src="{{ product.productimage_set.get_default_image.image.url }}" |
|
|
|
<img src="{{ product.productimage_set.get_default_image.image.url }}" |
|
|
|
alt="{{ product.name }}"> |
|
|
|
alt="{{ product.name }}"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
<div class="catalog__dec"> |
|
|
|
|
|
|
|
<div class="catalog__title"> |
|
|
|
|
|
|
|
<a href="{{ product.get_absolute_url }}">{{ product.name }}</a></div> |
|
|
|
|
|
|
|
<div class="catalog__star"> |
|
|
|
|
|
|
|
<form action=""> |
|
|
|
|
|
|
|
<select class="stars" data-rating="2"> |
|
|
|
|
|
|
|
<option value="1">1</option> |
|
|
|
|
|
|
|
<option value="2">2</option> |
|
|
|
|
|
|
|
<option value="3">3</option> |
|
|
|
|
|
|
|
<option value="4">4</option> |
|
|
|
|
|
|
|
<option value="5">5</option> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="catalog__price"> |
|
|
|
|
|
|
|
{{ product.offer.get_price_with_discount }}{{ product.offer.currency.sign }}</div> |
|
|
|
|
|
|
|
<div class="catalog__dec-list"> |
|
|
|
|
|
|
|
<ul> |
|
|
|
|
|
|
|
<li><span>Артикул:</span>{{ product.offer.vendor_code }}</li> |
|
|
|
|
|
|
|
<li><span>НДС:</span>{{ product.offer.account_nds|apply_nds_status }}</li> |
|
|
|
|
|
|
|
<li><span>Платформа:</span>{{ product.platform }}</li> |
|
|
|
|
|
|
|
<li><span>Тип поставки:</span>{{ product.offer.supply_type.name }}</li> |
|
|
|
|
|
|
|
<li><span>Срок поставки:</span>{{ product.offer.supply_type.get_formatted_desc }}</li> |
|
|
|
|
|
|
|
<li><span>Примечание:</span>{{ product.offer.note }}</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
<div class="catalog__dec"> |
|
|
|
{% if request.user.is_authenticated %} |
|
|
|
<div class="catalog__title"> |
|
|
|
<div class="catalog__btn"> |
|
|
|
<a href="{{ product.get_absolute_url }}">{{ product.name }}</a></div> |
|
|
|
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data"> |
|
|
|
<div class="catalog__star"> |
|
|
|
{% csrf_token %} |
|
|
|
<form action=""> |
|
|
|
<input type="hidden" name="offer" value="{{ product.id }}"> |
|
|
|
<select class="stars" data-rating="2"> |
|
|
|
<input type="hidden" name="amount" value="1"> |
|
|
|
<option value="1">1</option> |
|
|
|
<input type="submit" value="Купить"> |
|
|
|
<option value="2">2</option> |
|
|
|
|
|
|
|
<option value="3">3</option> |
|
|
|
|
|
|
|
<option value="4">4</option> |
|
|
|
|
|
|
|
<option value="5">5</option> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="catalog__price"> |
|
|
|
{% endif %} |
|
|
|
{{ product.offer.get_price_with_discount }}{{ product.offer.currency.sign }}</div> |
|
|
|
|
|
|
|
<div class="catalog__dec-list"> |
|
|
|
|
|
|
|
<ul> |
|
|
|
|
|
|
|
<li><span>Артикул:</span>{{ product.offer.vendor_code }}</li> |
|
|
|
|
|
|
|
<li><span>НДС:</span>{{ product.offer.account_nds|apply_nds_status }}</li> |
|
|
|
|
|
|
|
<li><span>Платформа:</span>{{ product.platform }}</li> |
|
|
|
|
|
|
|
<li><span>Тип поставки:</span>{{ product.offer.supply_type.name }}</li> |
|
|
|
|
|
|
|
<li><span>Срок поставки:</span>{{ product.offer.supply_type.get_formatted_desc }}</li> |
|
|
|
|
|
|
|
<li><span>Примечание:</span>{{ product.offer.note }}</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% if request.user.is_authenticated %} |
|
|
|
{% empty %} |
|
|
|
<div class="catalog__btn"> |
|
|
|
<div class="catalog__item"> |
|
|
|
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data"> |
|
|
|
На данный момент товары отсутсвуют, зайдите позже :)) |
|
|
|
{% csrf_token %} |
|
|
|
|
|
|
|
<input type="hidden" name="offer" value="{{ product.id }}"> |
|
|
|
|
|
|
|
<input type="hidden" name="amount" value="1"> |
|
|
|
|
|
|
|
<input type="submit" value="Купить"> |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
{% if paginator.num_pages > 1 %} |
|
|
|
{% empty %} |
|
|
|
{% spaceless %} |
|
|
|
<div class="catalog__item"> |
|
|
|
<div class="row pagination"> |
|
|
|
На данный момент товары отсутсвуют, зайдите позже :)) |
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
</div> |
|
|
|
{% if page_obj.has_previous %} |
|
|
|
{% endfor %} |
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
{% if paginator.num_pages > 1 %} |
|
|
|
|
|
|
|
{% spaceless %} |
|
|
|
|
|
|
|
<div class="row pagination"> |
|
|
|
|
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
|
|
|
|
{% if page_obj.has_previous %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_obj.previous_page_number }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
|
|
|
|
« |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
|
|
|
|
{% if paginator.has_previous %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_obj.previous_page_number }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
|
|
|
|
« |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
|
|
|
|
{% if paginator.has_previous %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_obj.number|add:"-1" }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
|
|
|
|
{{ page_obj.number|add:"-1" }} |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
<span>{{ page_obj.number }}</span> |
|
|
|
|
|
|
|
{% if page_obj.has_next %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_obj.number|add:"-1" }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
|
|
|
|
{{ page_obj.number|add:"-1" }} |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
<span>{{ page_obj.number }}</span> |
|
|
|
|
|
|
|
{% if page_obj.has_next %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_obj.number|add:"+1" }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
|
|
|
|
{{ page_obj.number|add:"+1" }} |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
{{ page_obj.number|add:"+1" }}{{ request.GET|filter_query_params:"page"|apply_query_params:True }}"> |
|
|
|
</div> |
|
|
|
{{ page_obj.number|add:"+1" }} |
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
</a> |
|
|
|
{% if page_obj.has_next %} |
|
|
|
{% endif %} |
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
|
|
|
|
{% if page_obj.has_next %} |
|
|
|
|
|
|
|
<a href="{{ request.path }}?page= |
|
|
|
{{ page_obj.next_page_number }}{{ request.GET|apply_query_params:True }}"> |
|
|
|
{{ page_obj.next_page_number }}{{ request.GET|apply_query_params:True }}"> |
|
|
|
» |
|
|
|
» |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endspaceless %} |
|
|
|
{% endspaceless %} |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endblock right_common_content %} |
|
|
|
{% endblock right_common_content %} |
|
|
|
|
|
|
|
|
|
|
|
|