<div class="item-product">
<a href="{{ documentUrl(product) }}" class="item-product__photo miniphoto" draggable="false">
<div class="miniphoto__list">
{% if product.oldPrice %}
<span class="discount-percent">-{{ discountPercent(product.oldPrice, product.price) }}%</span>
{% endif %}
<div class="miniphoto__item active">
{{ include('application/partial/picture.html.twig', {image: product.image, width: 270, height: 270}) }}
</div>
{% for image in product.images %}
<div class="miniphoto__item">
{{ include('application/partial/picture.html.twig', {image: image, width: 270, height: 270}) }}
</div>
{% endfor %}
</div>
<div class="miniphoto__over">
<div class="miniphoto__over-item active"></div>
{% for image in product.images %}
<div class="miniphoto__over-item"></div>
{% endfor %}
</div>
{% if product.images|length > 0 %}
<div class="miniphoto__control">
<div class="miniphoto__control-item active"></div>
{% for image in product.images %}
<div class="miniphoto__control-item"></div>
{% endfor %}
</div>
{% endif %}
{% if product.hit or product.new %}
<div class="item-product__label">
{% if product.hit %}
<span class="item-label bg--primary">ХИТ</span>
{% endif %}
{% if product.new %}
<span class="item-label bg--info">Новинка</span>
{% endif %}
</div>
{% endif %}
</a>
<div class="item-product__title"><a href="{{ documentUrl(product) }}">{{ product.name(app.request.locale) }}</a></div>
{% set validPrice = cart.validPrice(product) %}
<div class="item-product__price">
{% if validPrice != product.price %}
{% if validPrice %}
<div class="price">
<span class="price__title">опт.</span>
<span class="price__value {% if product.oldPrice %}with-discount{% endif %}">{{ validPrice|number_format(2, '.', ' ') }}</span>
<span class="price__unit">₽ за шт.</span>
{% if product.oldPrice %}
<span class="price__value-old">{{ product.oldPrice|number_format(2, '.', ' ') }}</span>
{% endif %}
<span class="price__unit">₽</span>
</div>
{% else %}
<span class="price__title">опт. Невозможно рассчитать индивидуальную цену</span>
{% endif %}
{% endif %}
<div class="price">
{% if validPrice != product.price %}
<span class="price__title">ррц.</span>
{% endif %}
<span class="price__value {% if product.oldPrice %}with-discount{% endif %}">{{ product.price|number_format(2, '.', ' ') }}<span class="price__unit"> ₽ / шт.</span></span>
{% if product.oldPrice %}
<span class="price__value-old">{{ product.oldPrice|number_format(2, '.', ' ') }} ₽</span>
{% endif %}
</div>
</div>
{% if product.quantity %}
<div class="item-product__stock stock">
В наличии {% if cart.counterpartyId %}{{ product.quantity }} шт.{% endif %}
</div>
{% else %}
<div class="item-product__stock stock disabled">
Нет в наличии
</div>
{% endif %}
{% if product.color %}
<div class="item-product__color color">
{% if product.color.image %}
<span class="color__photo"><img src="{{ resizeImage(product.color.image, 20, 20) }}" width="20" height="20" alt=""></span>
{% endif %}
{{ product.color.name(app.request.locale) }}
</div>
{% endif %}
{% if product.quantity %}
{{ include('application/catalog/add-to-cart-block.html.twig') }}
{% endif %}
</div>