{% set id = product.getId() %}
{% set name = product.getName() %}
{% set link = product.getLink() %}
{% set productCode = product.productCode() %}
{% set stockMax = product.getStockMax() %}
{% set price = price_calculator.calculate(product) %}
{% set availability = availability.get(product) %}
{% if isDesignKutil() %}
{% set price = price_calculator.calculate(product) %}
<div class="productList__item{{ enableCompare and comparator.hasProduct(id) ? ' bg-compare' }}">
{% if enableCompare %}
{% if comparator.hasProduct(id) %}
<a class="compare active" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}">
<i class="icon icon-compare"></i>
</a>
{% else %}
<a class="compare" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}">
<i class="icon icon-compare"></i>
</a>
{% endif %}
{% endif %}
<div class="productList__img">
{{ direct_edit(product) | raw }}
<img
class="js-lazyload"
src="{{ image_lazyload_placeholder }}"
data-src="{{ product.getImageUri('s') }}"
alt="{{ product.getImageAlt }}"
/>
</div>
<div class="productList__content">
<a
class="productList__title"
href="{{ product.getLink() }}"
title="{{ product.getName() }}"
data-gtm="{{ product.getGtmId() }}"
>
{{ product.getName() }}
</a>
<span class="productList__sku">
{{ translator.getValue('PRODUCTS_SKU') }}
<span>:</span>
<span class="productList__sku__num">
{{ product.getProductCode() }}
</span>
</span>
</div>
<div class="productList__prices">
{% set unit = product.getUnit is not null ? product.getUnit.getName : 'Ks' %}
{% set priceInfo = product.package(app.user) > 1 ? translator.getValue('PRICE_FOR_UNIT','cena za 1 %jednotka%') | replace({'%jednotka%' : unit }) : '' %}
{% if settings.priceIncVat %}
{% if price.excVat > 0.00 %}
<strong class="price price--incVat">
{% if product.getVariant %}
<span class="price__from">
{{ translator.getValue("CENA_OD", "od ") }}
</span>
{% endif %}
{{ price.fIncVat | raw }}
<span class="price-unit-info">
{{ priceInfo }}
</span>
</strong>
<span class="price price--excVat">
{{ price.fExcVat | raw }}
<span class="price-unit-info">
{{ priceInfo }}
</span>
</span>
{% else %}
<span class="price">
{{ translator.getValue('NENI_SKLADEM', 'Na dotaz') }}
</span>
<strong class="priceVat">
{{ translator.getValue('NENI_SKLADEM', 'Na dotaz') }}
</strong>
{% endif %}
{% else %}
<strong class="price price--incVat">
{% if product.getVariant %}
<span class="price__from">
{{ translator.getValue("CENA_OD", "od ") }}
</span>
{% endif %}
{{ price.fExcVat | raw }}
<span class="price-unit-info">
{{ priceInfo }}
</span>
</strong>
<span class="price price--excVat">
{{ price.fIncVat | raw }}
<span class="price-unit-info">
{{ priceInfo }}
</span>
</span>
{% endif %}
{% if product.getTypes | length and product.getVariant %}
{% include 'component/product/common/availability/avail-types.html.twig' %}
{% else %}
{% include 'component/product/common/availability/avail-basic.html.twig' %}
{% endif %}
</div>
<div class="productList__actions">
{% if partner_config.getAllowListBuy %}
{% if product.getTypes | length and product.getVariant %}
<a
href="{{ product.getLink() }}"
title="{{ product.getName() }}"
class="btn btn-primary btn-detail pull-lg-right"
data-gtm="{{ product.getGtmId() }}"
>
{{ translator.getValue('DETAIL') }}
</a>
{% else %}
{% include 'component/product/common/purchase_form/list.html.erb' with { product: product } %}
{% endif %}
{% else %}
<a
href="{{ product.getLink() }}"
title="{{ product.getName() }}"
class="btn btn-primary btn-detail pull-lg-right"
data-gtm="{{ product.getGtmId() }}"
>
{{ translator.getValue('DETAIL') }}
</a>
{% endif %}
</div>
</div>
{% else %}
<tr>
{% if favorites is defined and favorites is same as (true) %}
<td class="image">
<img class="js-lazyload" src="{{ image_lazyload_placeholder }}" data-src="{{ product.getImageUri('s') }}" alt="{{ product.getImageAlt }}">
<noscript>
<img src="{{ product.getImageUri('s') }}" alt="{{ product.getImageAlt }}">
</noscript>
</td>
{% else %}
{% if isDesignButterfly() %}
<td class="image">
<img class="js-lazyload" src="{{ image_lazyload_placeholder }}" data-src="{{ product.getImageUri('s') }}" alt="{{ product.getImageAlt }}">
<noscript>
<img src="{{ product.getImageUri('s') }}" alt="{{ product.getImageAlt }}">
</noscript>
</td>
{% endif %}
{% endif %}
{# ID produktu #}
<td data-attr-prodSku="{{ translator.getValue('PRODUCTS_SKU') }}" class="sku text-xs-center">{{ direct_edit(product) | raw }}{{ productCode }}</td>
{# Nazev produktu #}
<td data-attr-prodTitle="{{ translator.getValue('NAZEV') }}" class="title">
<a class="productList__title" href="{{ link }}" title="{{ name }}" data-gtm="{{ product.getGtmId() }}">{{ name }}</a>
</td>
{# Skladova zasoba #}
<td data-attr-prodStock="{{ translator.getValue('SKLAD') }}" class="stock text-xs-center">
{% if product.getTypes | length and product.getVariant %}
{% include 'component/product/common/availability/avail-types.html.twig' %}
{% else %}
{% include 'component/product/common/availability/avail-basic.html.twig' %}
{% endif %}
</td>
{# Cena s a bez DPH #}
{#{% if settings.priceIncVat %}
<td class="price text-xs-right"><span class="price">{{ price.fExcVat | raw }}</span></td>
<td class="priceVat text-xs-right"><strong class="priceVat">{{ price.fIncVat | raw }}</strong></td>
{% else %}
<td class="price text-xs-right"><span class="price">{{ price.fIncVat | raw }}</span></td>
<td class="priceVat text-xs-right"><strong class="priceVat">{{ price.fExcVat | raw }}</strong></td>
{% endif %}#}
{% set unit = product.getUnit is not null ? product.getUnit.getName : 'Ks' %}
{% set priceInfo = product.package(app.user) > 1 ? translator.getValue('PRICE_FOR_UNIT','cena za 1 %jednotka%') | replace({'%jednotka%' : unit }) : '' %}
{% if settings.priceIncVat %}
{% if price.excVat > 0.00 %}
{# Cena bez DPH #}
<td data-attr-prodPrice="{{ translator.getValue('CENA_BEZ_DPH') }}" class="price text-xs-right"><span class="price">
{% if category.getDecimalPricesStatus() %}
{{ currency.formatCustom(price.excVat)|raw }}
{% else %}
{{ currency.format(price.excVat)|raw }}
{% endif %}
</span></td>
{# Cena s DPH #}
<td data-attr-prodPriceVat="{{ translator.getValue('CENA_S_DPH') }}" class="priceVat text-xs-right"><strong class="priceVat">
{% if category.getDecimalPricesStatus() %}
{{ currency.formatCustom(price.incVat)|raw }}
{% else %}
{{ currency.format(price.incVat)|raw }}
{% endif %}
</strong></td>
{% else %}
{# Cena bez DPH #}
<td data-attr-prodPrice="{{ translator.getValue('CENA_BEZ_DPH') }}" class="price text-xs-right"><span class="price">{{ translator.getValue('NENI_SKLADEM', 'Na dotaz') }}</span></td>
{# Cena s DPH #}
<td data-attr-prodPriceVat="{{ translator.getValue('CENA_S_DPH') }}" class="priceVat text-xs-right"><strong class="priceVat">{{ translator.getValue('NENI_SKLADEM', 'Na dotaz') }}</strong></td>
{% endif %}
{% else %}
{# Cena s DPH #}
<td data-attr-prodPriceVat="{{ translator.getValue('CENA_S_DPH') }}" class="priceVat text-xs-right"><strong class="priceVat">
{# Šlo do exceptionu - DM - 2.12.2021 - přidáno is defined pro category #}
{% if category is defined and category.getDecimalPricesStatus() %}
{{ currency.formatCustom(price.excVat)|raw }}
{% else %}
{{ currency.format(price.excVat)|raw }}
{% endif %}
</strong></td>
{# Cena bez DPH #}
<td data-attr-prodPrice="{{ translator.getValue('CENA_BEZ_DPH') }}" class="price text-xs-right"><span class="price">
{# Šlo do exceptionu - DM - 2.12.2021 - přidáno is defined pro category #}
{% if category is defined and category.getDecimalPricesStatus() %}
{{ currency.formatCustom(price.incVat)|raw }}
{% else %}
{{ currency.format(price.incVat)|raw }}
{% endif %}
</span></td>
{% endif %}
{# Porovnat #}
{% if enableCompare %}
{% if comparator.hasProduct(id) %}
<td data-attr-compare="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}" class="comparsion text-xs-center bg-compare">
<a class="compare active" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}">
<i class="icon-compare"></i>
</a>
</td>
{% else %}
<td data-attr-compare="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}" class="comparsion text-xs-center">
<a class="compare" data-compare="1" href="/_product-compare/toggle/{{ product.getId() }}" title="{{ translator.getValue('PRODUCT_COMPARE_TEXT', 'Porovnání produktu') }}">
<i class="icon-compare"></i>
</a>
</td>
{% endif %}
{% endif %}
{# Detail produktu #}
{% 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 %}
<td class="productBuy text-xs-center"><a href="{{ link }}" title="{{ name }}" class="btn btn-primary btn-detail pull-md-right" data-gtm="{{ product.getGtmId() }}">{{ translator.getValue('DETAIL') }}</a></td>
{% else %}
<td class="productBuy text-xs-center">
{% include 'component/product/common/purchase_form/list.html.erb' with { product: product } %}
</td>
{% endif %}
{% else %}
<td class="productBuy text-xs-center"><a href="{{ link }}" title="{{ name }}" class="btn btn-primary btn-detail pull-md-right" data-gtm="{{ product.getGtmId() }}">{{ translator.getValue('DETAIL') }}</a></td>
{% endif %}
</tr>