diff --git a/templates/404.html b/templates/404.html index b12a79d..104ea6a 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1 +1,13 @@ -{% %} +{% extends 'base.html' %} + +{% block content %} +
+
+
+
+

Упс, такой страницы не существует. Вернитесь на предущую страницу

+
+
+
+
+{% endblock content %} diff --git a/templates/500.html b/templates/500.html index e149a39..4150f55 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,10 +1,13 @@ - - - - - Title - - +{% extends 'base.html' %} - - +{% block content %} +
+
+
+
+

Произошла ошибка на сайте. Просим извинения за неудобства. Зайдите позже :))

+
+
+
+
+{% endblock content %} diff --git a/templates/base.html b/templates/base.html index 31b4c1f..598ac41 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,9 +24,7 @@ - - - + {% block extra_head_content %} {% endblock extra_head_content %} @@ -52,12 +50,8 @@ {% block extra_post_content %} {% endblock extra_post_content %} - + - -{##} -{##} -{##} {% block extra_body_js %} {% endblock extra_body_js %} diff --git a/templates/common.html b/templates/common.html index 73fbe2a..9d89336 100644 --- a/templates/common.html +++ b/templates/common.html @@ -1,6 +1,7 @@ {% extends 'base.html' %} {% load static %} {% load crispy_forms_tags %} +{% load products_filters %} {% block content %}
@@ -13,17 +14,37 @@ {% block extra_left_menu_items %} {% endblock extra_left_menu_items %} - {% if product_categories %} + {% if the_product_category or product_categories %}
- {% for category in product_categories %} + {% if the_product_category and the_product_category.parent %} + href="{{ the_product_category.parent.get_absolute_url }}"> + {% if category.image %} + + {{ category.name }} + + {% endif %} + Вернуться в {{ the_product_category.parent.name }} + + {% elif the_product_category %} + + Вернуться в Каталог + + {% endif %} + {% if product_categories %} + {% for category in product_categories %} + + {% if category.image %} - {{ category.name }} + {{ category.name }} - {{ category.name }} - - {% endfor %} + {% endif %} + {{ category.name }} + + {% endfor %} + {% endif %}
{% endif %} {% if left_contact_us_form %} @@ -57,31 +78,46 @@ {% endif %}
- {% if product_categories %} + {% if hasCategories %}
{% endif %} - {% include 'components/breadcrumbs.html' %} + + {% if not is_index %} + {% include 'components/breadcrumbs.html' %} + {% endif %} {% block right_common_content %} {% endblock right_common_content %} {% if content_contact_us_form %} diff --git a/templates/common_news.html b/templates/common_news.html new file mode 100644 index 0000000..cc54c66 --- /dev/null +++ b/templates/common_news.html @@ -0,0 +1,5 @@ +{% extends 'base.html'%} + +{% block content %} + {% include 'components/breadcrumbs.html' %} +{% endblock content%} diff --git a/templates/components/breadcrumbs.html b/templates/components/breadcrumbs.html index 6e77b2c..8c07802 100644 --- a/templates/components/breadcrumbs.html +++ b/templates/components/breadcrumbs.html @@ -1,7 +1,11 @@ -{% if request.resolver_match.url_name != "index" %} - -{% endif %} +{% load mptt_tags %} + + diff --git a/templates/components/header.html b/templates/components/header.html index 5c36b57..e9cbb67 100644 --- a/templates/components/header.html +++ b/templates/components/header.html @@ -15,7 +15,7 @@ Каталог
  • - Новости + Новости
  • Акции @@ -40,24 +40,25 @@
    -
    +
    {% if not request.user.is_authenticated %} Вход Регистрация {% else %} {% endif %} - - {% if request.user.is_authenticated %} - Перейти в корзину{{ "5" }} - {% else %} - Перейти в корзину - {% endif %} - - + {% if request.user.is_authenticated %} + + Перейти в корзину + {% if cart|length > 0 %} + {{ cart|length }} + {% endif %} + + {% endif %}
    -
    -
    -{% endblock content %} \ No newline at end of file +{% endblock extra_post_content %} diff --git a/templates/products/product_list.html b/templates/products/product_list.html index 9474318..2d2adeb 100644 --- a/templates/products/product_list.html +++ b/templates/products/product_list.html @@ -1,146 +1,152 @@ {% extends 'common.html' %} {% load static %} +{% load crispy_forms_tags %} +{% load core_tags %} +{% load products_filters %} +{% load product_tags %} + + +{% block breadcrums %} + {% breadcrumb_url 'Каталог' 'products:product_list' %} + {% if the_product_category.get_ancestors.exists %}{% endif %} + {% breadcrumb_url the_product_category.name 'products:product_list' the_product_category.get_path %} +{% endblock breadcrums %} {% block extra_left_menu_items %} -
    -
    - Фильтр товаров -
    -
    - Цена -
    -
    -
    - от - - до - + {% if left_product_filter_formset %} +
    +
    + Фильтр товаров
    -
    - -
    -
    -
    Производитель
    - -
    -
    -
    Тип поставки
    - -
    -
    -
    Назначение
    - + {% if left_product_filter_formset.price %} + {% crispy left_product_filter_formset.price %} + {% endif %} +
    + {% if left_product_filter_formset.manufacturer %} +
    + {% crispy left_product_filter_formset.manufacturer %} +
    + {% endif %} + {% if left_product_filter_formset.supply_type %} +
    + {% crispy left_product_filter_formset.supply_type %} +
    + {% endif %} + {% if left_product_filter_formset.supply_target %} +
    + {% crispy left_product_filter_formset.supply_target %} +
    + {% endif %}
    -
    + {% endif %} {% endblock extra_left_menu_items %} {% block right_common_content %} -
    Производители
    -
    -
    - Сортировать по - -
    + {% crispy product_sort_form %}
    - {% for product in products %} -
    -
    + {% for product in object_list %} +
    + +
    + {% if product.productimage_set.get_default_image %}
    - {{ product.name }} + {{ product.name }}
    -
    - -
    - {{ product.offer.price }} {{ product.offer.currency }} -
    -
    -
      -
    • Артикул:057J1-WWW8695-T548
    • -
    • НДС:Включен
    • -
    • Платформа:Windows
    • -
    • Тип поставки:Любой из доступных
    • -
    • Срок поставки:3-14 дней
    • -
    • Примечание:Временная лицензия, 1 год – новая покупка, локальная
    • -
    -
    + {% endif %} +
    + +
    +
    + +
    +
    +
    + {{ product.offer.get_price_with_discount }}{{ product.offer.currency.sign }}
    +
    +
      +
    • Артикул:{{ product.offer.vendor_code }}
    • +
    • НДС:{{ product.offer.account_nds|apply_nds_status }}
    • +
    • Платформа:{{ product.platform }}
    • +
    • Тип поставки:{{ product.offer.supply_type.name }}
    • +
    • Срок поставки:{{ product.offer.supply_type.get_formatted_desc }}
    • +
    • Примечание:{{ product.offer.note }}
    • +
    -
    -
    - {% empty %} -
    -
    -
    -
    - -
    -
    - -
    -
    -
    79 400 ₽ / 1398 $
    -
    -
      -
    • Артикул:057J1-WWW8695-T548
    • -
    • НДС:Включен
    • -
    • Платформа:Windows
    • -
    • Тип поставки:Любой из доступных
    • -
    • Срок поставки:3-14 дней
    • -
    • Примечание:Временная лицензия, 1 год – новая покупка, локальная
    • -
    -
    -
    +
    +
    + {% csrf_token %} + + + +
    +
    +
    + {% empty %} +
    + На данный момент товары отсутсвуют, зайдите позже :)) +
    + {% endfor %} + {% if paginator.num_pages > 1 %} + {% spaceless %} + {% endblock right_common_content %}