parent
7cdb020b0f
commit
ca085a02fd
13 changed files with 336 additions and 427 deletions
@ -1 +1,13 @@ |
|||||||
{% %} |
{% extends 'base.html' %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div class="col-lg-4 col-lg-offset-4"> |
||||||
|
<div class="reg"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-12 text-center"> |
||||||
|
<h3>Упс, такой страницы не существует. Вернитесь на предущую <a href="{{ request.HTTP_REFFERER }}">страницу</a></h3> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock content %} |
||||||
|
|||||||
@ -1,10 +1,13 @@ |
|||||||
<!DOCTYPE html> |
{% extends 'base.html' %} |
||||||
<html lang="en"> |
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<title>Title</title> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
|
|
||||||
</body> |
{% block content %} |
||||||
</html> |
<div class="col-lg-4 col-lg-offset-4"> |
||||||
|
<div class="reg"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-12 text-center"> |
||||||
|
<h3>Произошла ошибка на сайте. Просим извинения за неудобства. Зайдите позже :))</h3> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock content %} |
||||||
|
|||||||
@ -0,0 +1,5 @@ |
|||||||
|
{% extends 'base.html'%} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
{% include 'components/breadcrumbs.html' %} |
||||||
|
{% endblock content%} |
||||||
@ -1,46 +0,0 @@ |
|||||||
{% extends "base.html" %} |
|
||||||
|
|
||||||
{% block title %} |
|
||||||
Ordering |
|
||||||
{% endblock %} |
|
||||||
|
|
||||||
{% block content %} |
|
||||||
<div class="col-sm-4"> |
|
||||||
<h2>Пожалуйста введите информацию о заказе.</h2> |
|
||||||
<form class="order-form" action="." method="post"> |
|
||||||
{% csrf_token %} |
|
||||||
{{ form.as_p }} |
|
||||||
<!--<label for="customer_name"></label>--> |
|
||||||
<!--<input id="customer_name" type="text" name="customer_name" maxlength="64">--> |
|
||||||
<!--<label for="customer_phone"></label>--> |
|
||||||
<!--<input id="customer_phone" type="text" name="customer_phone" maxlength="64">--> |
|
||||||
<!--<label for="customer_email"></label>--> |
|
||||||
<!--<input id="customer_email" type="text" name="customer_email" maxlength="64">--> |
|
||||||
<!--<label for="city"></label>--> |
|
||||||
<!--<input id="city" type="text" name="city" maxlength="100">--> |
|
||||||
<input type="submit" value="Submit"> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="order-info col-sm-8"> |
|
||||||
<h2>Ваш заказ</h2> |
|
||||||
<ul> |
|
||||||
{% for item in cart %} |
|
||||||
<li> |
|
||||||
{{ item.offer.name }} | Количество: {{ item.quantity }} | Стоимость: {{ item.total_price }} руб. |
|
||||||
</li> |
|
||||||
{% endfor %} |
|
||||||
{% if cart.discount %} |
|
||||||
<li> |
|
||||||
"{{ cart.discount.code }}" ({{ cart.discount.discount }}% less) |
|
||||||
<span> - {{ cart.get_discount|floatformat:"2"}} руб.</span> |
|
||||||
</li> |
|
||||||
{% endif %} |
|
||||||
</ul> |
|
||||||
{% if request.session.points %} |
|
||||||
<p><strong>Всего:</strong> {{ cart.get_total_deduct_points|floatformat:"2"}} руб.</p> |
|
||||||
{% else %} |
|
||||||
<p><strong>Всего:</strong> {{ cart.get_total_price|floatformat:"2"}} руб.</p> |
|
||||||
{% endif %} |
|
||||||
</div> |
|
||||||
{% endblock %} |
|
||||||
@ -1,14 +0,0 @@ |
|||||||
{% extends "base.html" %} |
|
||||||
|
|
||||||
{% block title %} |
|
||||||
Спасибо за заказ |
|
||||||
{% endblock %} |
|
||||||
|
|
||||||
{% block content %} |
|
||||||
<h1>Благодарим Вас за заказ!</h1> |
|
||||||
<h1>На указанную Вами почту было отправлено платежное поручение, заказ будет принят в работу после оплаты.</h1> |
|
||||||
<p>Номер Вашего заказа: {{ order.id }}</p> |
|
||||||
<p class="text-right"> |
|
||||||
<a href="{% url 'products:ProductList'%}" class="btn btn-success">На главную страницу</a> |
|
||||||
</p> |
|
||||||
{% endblock %} |
|
||||||
@ -1,121 +0,0 @@ |
|||||||
{% load static %} |
|
||||||
|
|
||||||
<html> |
|
||||||
|
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<title>Document</title> |
|
||||||
|
|
||||||
<style> |
|
||||||
table, th, td { |
|
||||||
border: 1px solid black; |
|
||||||
border-collapse: collapse; |
|
||||||
} |
|
||||||
th, td { |
|
||||||
padding: 5px; |
|
||||||
text-align: left; |
|
||||||
} |
|
||||||
|
|
||||||
td#h01, td#h03 { |
|
||||||
border: 0px; |
|
||||||
font-weight:bold; |
|
||||||
} |
|
||||||
|
|
||||||
td#h02, td#h04 { |
|
||||||
border-top: 0px; |
|
||||||
font-size: x-small; |
|
||||||
} |
|
||||||
|
|
||||||
td#t01, td#t02, td#t03 { |
|
||||||
text-align: right; |
|
||||||
font-weight:bold; |
|
||||||
} |
|
||||||
</style> |
|
||||||
</head> |
|
||||||
|
|
||||||
<body> |
|
||||||
<!--<h3>--> |
|
||||||
<!--ВНИМАНИЕ! В ПЛАТЕЖНОМ ПОРУЧЕНИИ УКАЗЫВАТЬ ПОЛНОЕ НАИМЕНОВАНИЕ--> |
|
||||||
<!--ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ "РУССКИЕ ПРОГРАММЫ".--> |
|
||||||
<!--</h3>--> |
|
||||||
<div><img src="file:///home/denis/Eshop/Eshop/static/img/payment_header.jpg"></div> |
|
||||||
<table class="table"> |
|
||||||
<tr> |
|
||||||
<td id="h01">{{ bank }}</td> |
|
||||||
<td>БИК</td> |
|
||||||
<td>{{ BIK }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td id="h02">Банк получателя</td> |
|
||||||
<td>Сч. №</td> |
|
||||||
<td>{{ bank_acc }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td rowspan="2" id="h03">{{ name }}</td> |
|
||||||
<td>ИНН</td> |
|
||||||
<td>{{ INN }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td>КПП</td> |
|
||||||
<td>{{ KPP }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td id="h04">Получатель</td> |
|
||||||
<td>Сч. №</td> |
|
||||||
<td>{{ acc }}</td> |
|
||||||
</tr> |
|
||||||
</table> |
|
||||||
<h3> |
|
||||||
<b><u>Счет на оплату № {{ order.id }} от {{ order.created }}</u></b> |
|
||||||
</h3> |
|
||||||
<table class="table"> |
|
||||||
<tr> |
|
||||||
<th>Поставщик:</th> |
|
||||||
<td>{{ sup_info }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<th>Покупатель:</th> |
|
||||||
<td>{{ order.customer_name }}</td> |
|
||||||
</tr> |
|
||||||
</table> |
|
||||||
<table class="table"> |
|
||||||
<thead> |
|
||||||
<tr> |
|
||||||
<th>№</th> |
|
||||||
<th>Товары(работы/услуги)</th> |
|
||||||
<th>Кол-во</th> |
|
||||||
<th>Ед.</th> |
|
||||||
<th>Цена</th> |
|
||||||
<th>Сумма</th> |
|
||||||
</tr> |
|
||||||
</thead> |
|
||||||
<tbody> |
|
||||||
{% for item in order.items.all %} |
|
||||||
<tr class="row{% cycle '1' '2' %}"> |
|
||||||
<td>{{ forloop.counter }}</td> |
|
||||||
<td>{{ item.product.name }}</td> |
|
||||||
<td>{{ item.number }}</td> |
|
||||||
<td>шт</td> |
|
||||||
<td>{{ item.price_per_itom }}</td> |
|
||||||
<td>{{ item.total_price }}</td> |
|
||||||
</tr> |
|
||||||
{% endfor %} |
|
||||||
<tr> |
|
||||||
<td colspan="5" id="t01">Итого:</td> |
|
||||||
<td class="num">{{ order.total_price }}</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td colspan="5" id="t02">Без налога (НДС)</td> |
|
||||||
<td class="num">-</td> |
|
||||||
</tr> |
|
||||||
<tr> |
|
||||||
<td colspan="5" id="t03">Всего к оплате:</td> |
|
||||||
<td class="num">{{ order.total_price }}</td> |
|
||||||
</tr> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
<p>Всего наименований {{ order.items.count }} на сумму {{ order.total_price }} руб.</p> |
|
||||||
<p>{{ verb_price }} {{ verb_cur }} 00 копеек</p> |
|
||||||
<img src="file:///home/denis/Eshop/Eshop/static/img/Payment_foot.jpg"> |
|
||||||
</body> |
|
||||||
</html> |
|
||||||
@ -1 +0,0 @@ |
|||||||
{% extends 'common.html' %} |
|
||||||
@ -1,70 +1,100 @@ |
|||||||
{% extends 'base.html' %} |
{% extends 'products/product_list.html' %} |
||||||
|
{% load static %} |
||||||
{% load staticfiles %} |
{% load core_tags %} |
||||||
|
{% load products_filters %} |
||||||
|
|
||||||
{% block title %} |
{% block breacrumbs %} |
||||||
{{ product.name }} |
{% breadcrumb_url 'Каталог' 'products:product_list' %} |
||||||
{% endblock %} |
{# {% breadcrumb_mptt_url product.get_ancestors %}#} |
||||||
|
{# {% breadcrum_url product.name 'products:product_details' product.get_path %}#} |
||||||
{% block content %} |
{% endblock breacrumbs %} |
||||||
|
|
||||||
<div class="boxlink"> |
{% block right_common_content %} |
||||||
<div class="link150"> |
<div class="content__subtitle">{{ product.name }}</div> |
||||||
<div class="blocktov"> |
<div class="good"> |
||||||
|
<div class="row"> |
||||||
<div class="greenline"> |
<div class="col-lg-6 col-12"> |
||||||
|
{% if product.productimage_set.exists %} |
||||||
|
<div class="good__slider"> |
||||||
<p>{{ product.name }}</p> |
<div class="slider__main-image"> |
||||||
|
<img src="{{ product.productimage_set.get_default_image.image.url }}" |
||||||
|
alt="{{ product.name }}"> |
||||||
<div class="textproduct"> |
|
||||||
<p>{{ product.description }}</p> |
|
||||||
</div> |
</div> |
||||||
|
<ul class="slider__list"> |
||||||
<div class="calcblock"> |
{% for product_image in product.productimage_set.get_all_images %} |
||||||
<input type="hidden" id="variants" name="variants" value="{{ variant_picker_data.variants }}"> |
<li> <img src="{{ product_image.image.url }}" alt="{{ product_image.name }}"></li> |
||||||
<input type="hidden" id="discount_policy" name="discount_policy" value="{{ variant_picker_data.discount_policy }}"> |
|
||||||
<input type="hidden" id="variant_length" name="variant_length" value="{{ variant_picker_data.variantAttributes|length }}"> |
|
||||||
{% for atribute in variant_picker_data.variantAttributes %} |
|
||||||
<div class="buy"> |
|
||||||
<label> {{ atribute.public_name }} </label> |
|
||||||
<select id="id_{{ forloop.counter0 }}" name="{{ atribute.name }}" onchange="calculate()"> |
|
||||||
{% for value in atribute.values %} |
|
||||||
<option value="{{ value }}" |
|
||||||
{% if value == atribute.values.0 %} selected="selected"{% endif %}> |
|
||||||
{{ value.name }} |
|
||||||
</option> |
|
||||||
{% endfor %} |
{% endfor %} |
||||||
|
</ul> |
||||||
</select> |
|
||||||
</div> |
</div> |
||||||
{% endfor %} |
{% endif %} |
||||||
|
</div> |
||||||
<div class="itog">Cash-back:<br><span id="erw">0</span> руб.</div> |
<div class="col-lg-6 col-12 good__information"> |
||||||
<p class="bonussumm" > <span id="result_itog">0</span></p> |
<div class="row"> |
||||||
|
<div class="col"> |
||||||
<div> |
<div class="good__price"> |
||||||
<form class="add" action="{% url 'cart:CartAdd'%}" method="post"> |
{% if product.offer.discount %} |
||||||
|
<div class="good__old-price"> |
||||||
|
{{ product.offer.price }}{{ product.offer.currency.sign }}</div> |
||||||
|
{% endif %} |
||||||
|
{% if product.offer.discount %} |
||||||
|
<div class="good__new-price"> |
||||||
|
{{ product.offer.get_price_with_discount }}{{ product.offer.currency.sign }}</div> |
||||||
|
{% else %} |
||||||
|
<div class="good__new-price"> |
||||||
|
{{ product.offer.price }}{{ product.offer.currency.sign }}</div> |
||||||
|
{% endif %} |
||||||
|
{% if product.offer.cashback > 0 %} |
||||||
|
<div class="good__cashback">Кэшбек |
||||||
|
{{ product.offer.cashback }}{{ product.offer.currency.sign }}</div> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col text-right"> |
||||||
|
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data"> |
||||||
{% csrf_token %} |
{% csrf_token %} |
||||||
{{ form }} |
<input type="hidden" name="offer" value="{{ product.id }}"> |
||||||
<input type="submit" value="Add to cart"> |
<div class="good__count"> |
||||||
|
Количество <input type="number" value="1" min="1" max="{{ product.offer.amount }}"> |
||||||
|
</div> |
||||||
|
<input class="good__btn-basket" type="submit" value="В корзину"> |
||||||
</form> |
</form> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="good__dec"> |
||||||
|
<div class="good__dec-title">Описание</div> |
||||||
|
<div class="good__dec-info"> |
||||||
|
{% if product.description > 0 %} |
||||||
|
{{ product.description|apply_desc_preview }} |
||||||
|
{% else %} |
||||||
|
У данного товара описание отсутсвует |
||||||
|
{% endif %} |
||||||
</div> |
</div> |
||||||
|
{% if product.description > 0 %} |
||||||
<div class="blocktovleft"> |
<a href="#" data-toggle="modal" data-target="#product-description" class="good__dec-next"> |
||||||
<img src="{% if product.image %}{{ product.image.url }}{% else %}{% static 'img/no-image.jpg'%}{% endif %}"> |
Читать полностью |
||||||
<div class="bonusblock"> |
</a> |
||||||
<p class="bonussumm" > <span id="result"></span></p> |
{% endif %} |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
{% endblock content %} |
{% endblock right_common_content %} |
||||||
|
{% block extra_post_content %} |
||||||
|
<div class="modal fade" id="product-description" tabindex="-1" role="dialog" aria-labelledby="#product-description"> |
||||||
|
<div class="modal-dialog" role="document"> |
||||||
|
<div class="modal-content"> |
||||||
|
<div class="modal-header text-center"> |
||||||
|
<h5 class="modal-title" id="exampleModalLongTitle">{{ product.name }}</h5> |
||||||
|
</div> |
||||||
|
<div class="modal-body"> |
||||||
|
{{ product.description }} |
||||||
|
</div> |
||||||
|
<div class="modal-footer"> |
||||||
|
<button type="button" class="btn btn-secondary btn-danger" data-dismiss="modal">Закрыть</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock extra_post_content %} |
||||||
|
|||||||
Loading…
Reference in new issue