{% if productTitleTag is not defined %}
{% set productTitleTag = 'div' %}
{% endif %}
{% if priceGroup is not defined %}
{% set priceGroup = customerMgr.getPriceContext() %}
{% endif %}
<li class="product" data-pid="{{ product.id }}">
{% if removeBt is defined %}
<a class="{{ removeBt }}" data-product="{{ product.id }}">
<svg xmlns="http://www.w3.org/2000/svg" id="Calque_2" viewBox="0 0 11.25 11.05">
<line style="fill:none;stroke:#000;stroke-miterlimit:10;" x1=".56" y1=".35" x2="10.9" y2="10.69"/>
<line style="fill:none;stroke:#000;stroke-miterlimit:10;" x1="10.69" y1=".35" x2=".35" y2="10.69"/>
</svg>
</a>
{% endif %}
<div class="picture">
{# <div class="buttons">
{% include 'front/modules/wishlist/bt.html.twig' %}
{% include 'front/cart/bt.html.twig' %}
</div>#}
{% if product.pictures|length > 0 %}
<img src="{{ asset(attribute(product.pictures,0).webPath) | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
{% elseif product.parent and product.parent.pictures|length > 0 %}
<img src="{{ asset(attribute(product.parent.pictures,0).webPath) | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
{% else %}
<img src="{{ asset('img/img-default.png') | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
{% endif %}
</div>
<div class="manufacturer">
{% if product.manufacturer %}
{% set slug = product.manufacturer.getUrl(app.request.locale) %}
<a href="{{ path('manufacturer',{id:product.manufacturer.id,url:slug}) }}">
{{ product.manufacturer.name }}
</a>
{% endif %}
</div>
{% if product.hasParent() %}
{% set productUrl = path('product',{id:product.parent.id,url:product.parent.url}) %}
{% else %}
{% set productUrl = path('product',{id:product.id,url:product.url}) %}
{% endif %}
<{{ productTitleTag }} class="title"><a href="{{ productUrl }}">{{ product.name|excerpt(60,'') }}</a></{{ productTitleTag }}>
{% if customerMgr.canSeePrices() %}
{% set country = customerMgr.getCustomerCountry() %}
{% if product.isAvailableForCountry(country) %}
{% set normalPrice = priceMgr.getPrice(product, 1, false) %}
{% set reducedPrice = priceMgr.getPrice(product, 1, false) %}
<div class="price-ctn cf">
{% if product.hasChildren() and product.getFromPrice(true, priceGroup) %}
<span class="from">{% trans %}A partir de :{% endtrans %}</span>
<span class="price">{{ product.getFromPrice(true, priceGroup)|price }}</span>
{% elseif product.getPrice(false, priceGroup) %}
{% if reducedPrice < product.getPrice(true) %}
<span class="price old-price">{{ normalPrice|price }}</span>
<span class="price reduced-price">{{ reducedPrice|price }}</span>
{% else %}
<span class="price">{{ normalPrice|price }}</span>
{% endif %}
{% endif %}
</div>
{% if discounts is defined and discounts and product.price %}
<div class="discount">
{% if product.id in discounts|keys %}
{{ attribute(discounts,product.id) }}
{% else %}
{% trans %}Remise de{% endtrans %} {{ (((reducedPrice-normalPrice) / normalPrice) * 100) | percent }}
{% endif %}
</div>
{% endif %}
{% endif %}
{% endif %}
{% if productItemFooter is defined and productItemFooter %}
{{ productItemFooter|raw }}
{% endif %}
</li>