templates/product_b2c/product_teaser.html.twig line 1

Open in your IDE?
  1. <!-- card product home -->
  2. {% set detailLink = app_product_detaillink_b2c(product) %}
  3. <div class="{% if editmode %} {% else %} col-6 col-sm-4 col-xl-3 b2c product-mecstore {% endif %}" data-productid="{{ product.id }}">
  4.     <div class="product-default inner-quickview inner-icon">
  5.         <figure>
  6.             <a href="{{ detailLink }}">
  7.                 <!-- le prime immagini devono avere la stessa dimensione tra di loro -->
  8.                 {% if(product.mainImage) %}                
  9.                     <img src="{{ product.mainImage.thumbnail({'height': 217, 'width': 217, 'format': 'jpeg'}) }}" width="217"
  10.                     height="217" alt="product" alt="{{ product.item }} {{ truncate_name(product.subText) | raw }}" title="{{ product.item }} {{ truncate_name(product.subText) | raw }}">             
  11.                 {% endif %}  
  12.             </a>
  13.             <!-- 
  14.             ##### ADDED WISHLIST #####
  15.             -->
  16.             {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  17.             <div class="btn-icon-group">
  18.                 {% if product.isInWishList == true %}                                 
  19.                 <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}}">
  20.                     <i class="icon-star-empty"></i>
  21.                 </a>
  22.                 {% else %}
  23.                 <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}}">
  24.                     <i class="icon-star-empty"></i>
  25.                 </a>
  26.                 {% endif %}                
  27.             </div>
  28.             {% endif %}             
  29.         </figure>
  30.        
  31.         <div class="product-details">
  32.             <div>  
  33.                 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  34.                 <!-- ################################# -->
  35.                 <!-- #### there are three options #### -->
  36.                 <!-- ################################# -->
  37.                 <!-- <p style="font-size:12px; text-transform:uppercase" class="status green pt-2 pb-0 mb-0">DISPONIBILE</p> <!-- this if products are available -->                
  38.                 <!-- <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 -->
  39.                 <!-- <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 -->
  40.                 <!-- -->
  41.                 {% endif %}
  42.                 <p class="manufacturer">{% if product.manufacturer is not empty %} {{product.manufacturer.name}} {% endif %}</p>
  43.                 <h4 class="product-title">
  44.                     <a href="{{ detailLink }}">
  45.                         {{ truncate_name(product.subText) | raw }}
  46.                     </a>
  47.                 </h4>
  48.             </div>
  49.             <!-- 
  50.             ###### CHANGE LAYOUT OF BUTTONS #####
  51.             -->
  52.             
  53.             <div class="add-cart-section d-flex justify-content-between d-flex flex-row">                
  54.                 
  55.                 <div class="quantity-container col-8 p-0 m-0">                     
  56.                     <div class="product-single-qty">
  57.                         {{ product.BaseUoM|trans  }}&nbsp;<input class="form-control product_qty m-0" min-qty="1" max-qty="1000000" value="" min="1" type="number">
  58.                     </div><!-- End .product-single-qty -->
  59.                 </div>
  60.                 <a  href="{{ path('b2c-shop-add-to-cart', { id: product.id }) }}" title="Aggiungi al carrello" class="btn-add-cart product-type-simple col-4">
  61.                     <i class="fas fa-shopping-cart"></i>
  62.                 </a>
  63.             </div>
  64.            
  65.             
  66.         </div><!-- End .product-details -->
  67.      
  68.     </div>
  69. </div><!-- End card product home -->