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.
76 lines
2.9 KiB
76 lines
2.9 KiB
{% extends 'base.html' %}
|
|
|
|
{% load staticfiles %}
|
|
|
|
|
|
{% block title %}
|
|
{{ product.name }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="boxlink">
|
|
<div class="link150">
|
|
<div class="blocktov">
|
|
|
|
<div class="greenline">
|
|
|
|
|
|
<p>{{ product.name }}</p>
|
|
|
|
|
|
<div class="textproduct">
|
|
<p>{{ product.description }}</p>
|
|
</div>
|
|
|
|
|
|
<div class="calcblock">
|
|
<input type="hidden" id="variants" name="variants" value="{{ variant_picker_data.variants }}">
|
|
<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.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 %}
|
|
</select>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<div class="itog">Cash-back:<br><span id="erw">0</span> руб.</div>
|
|
<p class="bonussumm" > <span id="result_itog">0</span></p>
|
|
|
|
<div>
|
|
<form class="add" action="{% url 'cart:CartAdd'%}" method="post">
|
|
{% csrf_token %}
|
|
{{ form }}
|
|
<!--<label for="quantity">Quantity: </label>-->
|
|
<!--<input type="number" id="quantity" name="quantity" value="0"-->
|
|
<!--onchange="calculate()">-->
|
|
<!--<input type="hidden" id="product_slug" name="product_slug">-->
|
|
<!--<input type="hidden" id="price_per_itom" name="price_per_itom">-->
|
|
<input type="submit" value="Add to cart">
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="blocktovleft">
|
|
<img src="{% if product.image %}{{ product.image.url }}{% else %}{% static 'img/no-image.jpg'%}{% endif %}">
|
|
<div class="bonusblock">
|
|
<p class="bonussumm" > <span id="result"></span></p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock content %} |