{% set id = product.getId() %}
{% set name = product.getName() %}
{% set link = product.getLink() %}
{% set annot = product.getAnnotation() | striptags %}
{% set price = price_calculator.calculate(product) %}
{% set availability = availability.get(product) %}
<div class="productList__item col-xs-12 col-md-{{ colSize }}">
<div class="productList__inner">
<a class="productList__img block cf" href="{{ link }}" title="{{ name }}" data-gtm="{{ product.getGtmId() }}">
<img src="{{ product.getImageUri('m') }}" alt="{{ name }}">
{% include 'component/product/list/labels.html.twig' with { price: price, product: product} %}
</a>
{% include 'component/product/common/rating/stars.html.twig' with { 'stars': product.getUserRatingStars(), 'rating': product.getUserRating() } %}
<h3 class="productList__title"><a href="{{ link }}" title="{{ name }}" data-gtm="{{ product.getGtmId() }}">{{ name | length > nameLength ? name | slice(0, nameLength) ~ '...' : name }}</a></h3>
<div class="productList__info cf">
<div class="productList__info__col price">
{% if price.excVat > 0.00 %}
{# Bezna cena #}
{% set priceToCompare = settings.priceIncVat ? price.incVat : price.excVat %}
{% if price.rrp is defined and price.rrp > 0 and price.rrp > priceToCompare and not (product.getTypes and product.getVariant|length) %}
<small class="price price--comPrice">
{% if category.getDecimalPricesStatus() %}
{{ currency.formatCustom(price.rrp)|raw }}
{% else %}
{{ currency.format(price.rrp)|raw }}
{% endif %}
</small>
{% endif %}
{# Cena s a bez DPH #}
{% if settings.priceIncVat %}
{% if category.getDecimalPricesStatus() %}
<strong class="price price--incVat">{{ currency.formatCustom(price.incVat)|raw }}</strong>
{% if settings.listPriceExtended %}
<div class="price price--excVat">{{ currency.formatCustom(price.excVat)|raw }} {{ translator.getValue('BEZ_DPH') }}</div>
{% endif %}
{% else %}
<strong class="price price--incVat">{{ currency.format(price.incVat)|raw }}</strong>
{% if settings.listPriceExtended %}
<div class="price price--excVat">{{ currency.format(price.excVat)|raw }} {{ translator.getValue('BEZ_DPH') }}</div>
{% endif %}
{% endif %}
{% else %}
{% if category.getDecimalPricesStatus() %}
<strong class="price price--incVat">{{ currency.formatCustom(price.excVat)|raw }}</strong> {{ translator.getValue('BEZ_DPH', 'bez DPH') }}{# EJ V080601 11.10.2021 #}
{% if settings.listPriceExtended %}
<div class="price price--excVat">{{ currency.formatCustom(price.incVat)|raw }} {{ translator.getValue('S_DPH') }}</div>
{% endif %}
{% else %}
<strong class="price price--incVat">{{ currency.format(price.excVat)|raw }}</strong> {{ translator.getValue('BEZ_DPH', 'bez DPH') }}{# EJ V080601 11.10.2021 #}
{% if settings.listPriceExtended %}
<div class="price price--excVat">{{ currency.format(price.incVat)|raw }} {{ translator.getValue('S_DPH') }}</div>
{% endif %}
{% endif %}
{% endif %}
{% else %}
<strong class="price price--incVat">{{ translator.getValue('NA_DOTAZ', 'Na dotaz') }}</strong>
{% endif %}
</div>
<div class="productList__info__col action">
{% if partner_config.getAllowListBuy and product.getPrice > 0 %} {# DS 2021-06-28 V078926 nákup z listu jen pokud má produkt cenu #}
{% if product.getTypes and product.getVariant|length %}
<a href="{{ link }}" title="{{ name }}" class="btn btn-primary btn-detail pull-right" data-gtm="{{ product.getGtmId() }}">{{ translator.getValue('DETAIL') }}</a>
{% else %}
{# DONE: includnout sablonu jednoducheho nakupnho formu, zbytek by mel fungovat automaticky #}
{% include 'component/product/common/purchase_form/list.html.erb' with { product: product } %}
{# <a href="{{ link }}" title="{{ name }}" class="buyable btn btn-primary btn-detail pull-right">{{ translator.getValue('PRODUCT_TYPE_BUY') }}</a> #}
{% endif %}
{% else %}
<a href="{{ link }}" title="{{ name }}" class="btn btn-primary btn-detail pull-right" data-gtm="{{ product.getGtmId() }}">{{ translator.getValue('DETAIL') }}</a>
{% endif %}
</div>
</div>
{# Dostupnost produktu + porovnani #}
<div class="productList__avail">
{% if enableCompare %}
{% if comparator.hasProduct(id) %}
<div class="productList__avail__col bg-compare">
<a class="compare" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('REMOVE_FROM_COMPARE') }}">
<i class="icon-compare"></i> {{ translator.getValue('POROVNANI') }}
</a>
</div>
{% else %}
<div class="productList__avail__col">
<a class="compare" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('ADD_TO_COMPARE') }}">
<i class="icon-compare"></i> {{ translator.getValue('POROVNANI') }}
</a>
</div>
{% endif %}
{% endif %}
<div class="productList__avail__col">
{% if product.getTypes|length %}
{% include 'component/product/common/availability/avail-types.html.twig' %}
{% else %}
{% include 'component/product/common/availability/avail-basic.html.twig' %}
{% endif %}
</div>
</div>
{% autoescape false %}
<div class="productList__desc">{{ annot | length > annotLength ? annot | slice(0, annotLength) ~ '...' : annot }}</div>
{% endautoescape %}
</div>
</div>