parent
c77794e75d
commit
6f44563f1e
4 changed files with 173 additions and 165 deletions
@ -0,0 +1,58 @@ |
||||
<div class="col-md-4 col-xs-4 col-sm-4 col-lg-4"> |
||||
<div class="thumbnail"> |
||||
{% if is_sale %} |
||||
<div class="sale-percent-block"> |
||||
-{{ product.min_price_variation().discount }}% |
||||
</div> |
||||
{% endif %} |
||||
{% set im = product.main_image()|thumbnail("420x420") %} |
||||
<a href="{{ product.get_absolute_url() }}"> |
||||
|
||||
<img src="/static/{{ im.url }}" |
||||
class="img-responsive" alt="Купить {{ product.title }}" |
||||
title="Купить {{ product.title }}"></a> |
||||
|
||||
<div class="caption"> |
||||
<div class="title"> |
||||
<a href="{{ product.get_absolute_url() }}"> |
||||
{{ product.title }} |
||||
</a> |
||||
</div> |
||||
<div class="price"> |
||||
{% if is_sale %} |
||||
<small class="text-danger"><s>{{ product.min_price_variation().price }} |
||||
₸</s></small> |
||||
{% endif %} |
||||
{{ product.min_price() }} ₸ |
||||
|
||||
</div> |
||||
{% if product.in_stock() %} |
||||
|
||||
|
||||
<div class="state-yes"> |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар |
||||
есть в наличии |
||||
</div> |
||||
{% else %} |
||||
<div class="state-no"> |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара |
||||
нет в наличии |
||||
</div> |
||||
{% endif %} |
||||
<div class="in-cart"> |
||||
{% if product.in_stock() %} |
||||
<a class="btn btn-warning btn-block" |
||||
href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span |
||||
class="glyphicon glyphicon-shopping-cart" |
||||
aria-hidden="true"></span> Добавить в корзину</span></a> |
||||
{% else %} |
||||
<a class=" btn btn-danger btn-block order-order-link" href="#order-form" |
||||
data-itemid="{{ product.pk }}"><span><span |
||||
class="glyphicon glyphicon-import" aria-hidden="true"></span> Заказать</span></a> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
Loading…
Reference in new issue