{#
Affichage de la miniature d'un produit
#}
<div class="product-thumbnail" data-product="{{ product.id }}">
{% if product_manager.priceTtc != 0 %}
{% if product_manager.isReduction == 1 %}
<span class="reduction">promo</span>
{% endif %}
{% endif %}
<a href="{{ product.slug }}" class="product-front product-link">
<div class="figure">
{% if configuration.useFiligrane == 1 %}
{% set filters = 'filigrane' %}
{% else %}
{% set filters = 'thumbnail' %}
{% endif %}
{% if product.cover != null %}
{% set image = product.cover %}
{% else %}
{% set image = 'no_image.png' %}
{% endif %}
<img src="{{ image|imagine_filter(filters, {"thumbnail": {"size": [230, 200], "mode" : "inset" }}) }}"
alt="">
</div> {# /.figure #}
<div class="product-content">
<p class="product-title">{{ product.designation|replace({'<p>': '', '</p>' : ''})|raw }}</p>
{% if product.onlineOnly == 0 or product.onlineOnly == 1 %}
{% if product_manager.priceTtc != 0 %}
<div class="product-prices">
<div class="current-price">{{ product_manager.priceTtc|striptags }} €</div>
{% if product_manager.isReduction == 1 %}
<div class="previous-price">
<span>{{ product_manager.initialPriceTtc|striptags }} €</span>
</div>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>
<div class="product-asides">
{% if account.user.id != null %}
<button class="btn btn-favoris-add {% if product_manager.isFavoris(account.user.favoris) == 1 %}active{% endif %}">
<div class="block" data-type="1">
<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="heart"
class="svg-inline--fa fa-heart fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512">
<path fill="currentColor"
d="M458.4 64.3C400.6 15.7 311.3 23 256 79.3 200.7 23 111.4 15.6 53.6 64.3-21.6 127.6-10.6 230.8 43 285.5l175.4 178.7c10 10.2 23.4 15.9 37.6 15.9 14.3 0 27.6-5.6 37.6-15.8L469 285.6c53.5-54.7 64.7-157.9-10.6-221.3zm-23.6 187.5L259.4 430.5c-2.4 2.4-4.4 2.4-6.8 0L77.2 251.8c-36.5-37.2-43.9-107.6 7.3-150.7 38.9-32.7 98.9-27.8 136.5 10.5l35 35.7 35-35.7c37.8-38.5 97.8-43.2 136.5-10.6 51.1 43.1 43.5 113.9 7.3 150.8z"></path>
</svg>
</div>
<div class="block" data-type="2">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="heart"
class="svg-inline--fa fa-heart fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512">
<path fill="currentColor"
d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"></path>
</svg>
</div>
</button>
{% endif %}
{% if product_manager.product.features|length <= 0 %}
<button class="btn btn-cart-speed product_cart_speed_open">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="220.2 -65.5 947.5 923"
style="enable-background:new 220.2 -65.5 947.5 923;" xml:space="preserve">
<path d="M528.2,634.6c-61.6,0-111.5,49.9-111.5,111.4s49.9,111.5,111.4,111.5c61.6,0,111.5-49.9,111.5-111.4
c0,0,0,0,0-0.1C639.5,684.5,589.7,634.7,528.2,634.6z M565.4,746c0,20.6-16.7,37.3-37.3,37.3s-37.3-16.7-37.3-37.3
s16.7-37.3,37.3-37.3c0,0,0,0,0,0C548.7,708.8,565.4,725.4,565.4,746z"></path>
<path d="M931.9,634.6c-61.6,0-111.4,49.9-111.4,111.5s49.9,111.4,111.4,111.4c61.5,0,111.4-49.9,111.4-111.4
C1043.3,684.5,993.4,634.7,931.9,634.6z M969.2,746.1c0,20.6-16.7,37.3-37.3,37.3c-20.6,0-37.3-16.7-37.3-37.3
c0-20.6,16.7-37.3,37.3-37.3C952.5,708.8,969.1,725.5,969.2,746.1z"></path>
<path d="M1159.2,82c-7.1-7.7-16.7-12.6-27.1-13.6L450.5,59l-15.7-48C419-34.4,376.5-65,328.4-65.5h-71.2
c-20.5,0-37.1,16.6-37.1,37.1s16.6,37.1,37.1,37.1h70.8c16.4,0.4,30.9,10.9,36.3,26.3l133,401.2l-8.4,19.5
c-13.6,35.3-9.5,75.1,11.1,106.8c20.6,31.4,55.3,50.8,92.9,51.8h413.2c20.5,0,37.1-16.6,37.1-37.1s-16.6-37.1-37.1-37.1H593.4
c-12.9-0.3-24.8-7.1-31.6-18.1c-7-11.2-8.4-24.8-4.3-36.2l4.8-10.7l438.2-45.8c55.7-6.2,101.6-46.7,114.6-101.3l50.8-212.7
C1169.7,103.8,1167.2,91.1,1159.2,82z M562.6,399.6l-87.8-266.3l609.2,8.9l-41,168.8l-0.1,0.3c-5.4,24.4-26.1,42.3-51,44
L562.6,399.6z"></path>
</svg>
<span class="cart_tag">+</span>
</button>
{% endif %}
</div>
</a> {# /.product-link #}
{% if product_manager.product.features|length <= 0 %}
<div class="product-back">
<div class="figure">
{% if configuration.useFiligrane == 1 %}
{% set filters = 'filigrane' %}
{% else %}
{% set filters = 'thumbnail' %}
{% endif %}
{% if product.cover != null %}
{% set image = product.cover %}
{% else %}
{% set image = 'no_image.png' %}
{% endif %}
<img src="{{ image|imagine_filter(filters, {"thumbnail": {"size": [230, 200], "mode" : "inset" }}) }}"
alt="">
</div> {# /.figure #}
<div class="product-content">
<label for="product_cart_speed_quantity_{{ product.id }}" class="product-title">{{ product.designation|replace({'<p>': '', '</p>' : ''})|raw }}</label>
{% if product_manager.product.onlineOnly == 0 or product_manager.product.onlineOnly == 1 and product_manager.product_manager.priceTtc > 0 and product_manager.product.stock > 0 %}
<form>
<div class="form-group">
<button class="btn-quantity product_cart_speed_remove">-</button>
<input type="text" value="1" class="product_cart_speed_quantity" id="product_cart_speed_quantity_{{ product.id }}">
<button class="btn-quantity product_cart_speed_add">+</button>
</div>
<div class="form-group form-controls">
<button class="btn btn-submit product_cart_speed_submit">Ajouter au panier</button>
<button class="btn-cancel product_cart_speed_cancel">Annuler</button>
<p class="product_cart_speed_messages"></p>
</div>
</form>
{% else %}
<p class="status">Indisponnible</p>
{% endif %}
</div>
<div class="product-asides">
<button class="btn-cancel product_cart_speed_cancel">
<i class="fas fa-arrow-right"></i>
</button>
</div>
</div>
{% endif %}
</div> {# /.product-thumbnail #}