<!-- card product home -->
{% set detailLink = app_product_detaillink_b2c(product) %}
<div class="{% if editmode %} {% else %} col-6 col-sm-4 col-xl-3 b2c product-mecstore {% endif %}" data-productid="{{ product.id }}">
<div class="product-default inner-quickview inner-icon">
<figure>
<a href="{{ detailLink }}">
<!-- le prime immagini devono avere la stessa dimensione tra di loro -->
{% if(product.mainImage) %}
<img src="{{ product.mainImage.thumbnail({'height': 217, 'width': 217, 'format': 'jpeg'}) }}" width="217"
height="217" alt="product" alt="{{ product.item }} {{ truncate_name(product.subText) | raw }}" title="{{ product.item }} {{ truncate_name(product.subText) | raw }}">
{% endif %}
</a>
<!--
##### ADDED WISHLIST #####
-->
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<div class="btn-icon-group">
{% if product.isInWishList == true %}
<a href="{{ path('wishlist-add', {'id': product.id,'remove': 'false'}) }}" data-href="false" data-id="{{product.id}}" title="Aggiungi ai preferiti" class="btn-icon btn-icon-wish added-wishlist wish-{{product.id}}">
<i class="icon-star-empty"></i>
</a>
{% else %}
<a href="{{ path('wishlist-add', {'id': product.id,'remove': 'true'}) }}" data-href="false" data-id="{{product.id}}" title="Aggiungi ai preferiti" class="btn-icon btn-icon-wish custom-btn-wish wish-{{product.id}}">
<i class="icon-star-empty"></i>
</a>
{% endif %}
</div>
{% endif %}
</figure>
<div class="product-details">
<div>
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<!-- ################################# -->
<!-- #### there are three options #### -->
<!-- ################################# -->
<!-- <p style="font-size:12px; text-transform:uppercase" class="status green pt-2 pb-0 mb-0">DISPONIBILE</p> <!-- this if products are available -->
<!-- <p style="font-size:12px; text-transform:uppercase" class="status orange pt-2 pb-0 mb-0">BASSA DISPONIBILITÀ</p>--> <!-- this if there are few products -->
<!-- <p style="font-size:12px; text-transform:uppercase" class="status red pt-2 pb-0 mb-0">NON DISPONIBILE</p>--> <!-- this if products are not available -->
<!-- -->
{% endif %}
<p class="manufacturer">{% if product.manufacturer is not empty %} {{product.manufacturer.name}} {% endif %}</p>
<h4 class="product-title">
<a href="{{ detailLink }}">
{{ truncate_name(product.subText) | raw }}
</a>
</h4>
</div>
<!--
###### CHANGE LAYOUT OF BUTTONS #####
-->
<div class="add-cart-section d-flex justify-content-between d-flex flex-row">
<div class="quantity-container col-8 p-0 m-0">
<div class="product-single-qty">
{{ product.BaseUoM|trans }} <input class="form-control product_qty m-0" min-qty="1" max-qty="1000000" value="" min="1" type="number">
</div><!-- End .product-single-qty -->
</div>
<a href="{{ path('b2c-shop-add-to-cart', { id: product.id }) }}" title="Aggiungi al carrello" class="btn-add-cart product-type-simple col-4">
<i class="fas fa-shopping-cart"></i>
</a>
</div>
</div><!-- End .product-details -->
</div>
</div><!-- End card product home -->