templates/entreprise/product_raw_list_1.html.twig line 1

Open in your IDE?
  1. {% for product in products %}
  2.         <div class="col-md-3 col-sm-6">
  3.        {# <div class="col-lg-3 col-md-4 col-sm-6 px-2 mb-4">#}
  4.           <div class="card product-card">
  5.             <div class="product-card-actions d-flex align-items-center">
  6.               <button class="btn-wishlist btn-sm" name="{{ path('add_product_to_wishlist', {'id':product.id}) }}" type="button" data-toggle="tooltip" data-placement="left" title="Mettre de côté"><i class="czi-heart"></i></button>
  7.             </div><a class="card-img-top d-block overflow-hidden" href="{{ path('display_product', {'leSlug': product.leSlug}) }}">
  8.                 {%  if product.imagePrincipale is not null %}
  9.                     <img src="{{ product.imagePrincipale.url }}" alt="{{ product.nom }}">
  10.                 {% endif %}
  11.                 </a>
  12.             <div class="card-body py-2">
  13.                 {% if product.subCategory is not null %}
  14.                 <a class="product-meta d-block font-size-xs pb-1" href="{{ path('product_by_sub_category', {'slug': product.subCategory.slug}) }}">{{ product.subCategory.nom }}</a>
  15.                 {% endif %}
  16.                 {% if product.stockDisponible < 1 %}
  17.                      <div class="d-flex justify-content-between">
  18.                         <div class="product-price"><span class="text-muted font-size-sm">En rupture de stock</span></div>
  19.                     </div>
  20.                     <br/>
  21.                 {% endif %}
  22.               <h3 class="product-title font-size-sm"><a href="{{ path('display_product', {'leSlug': product.leSlug}) }}">
  23.                     <span title="{{ product.nom }}">
  24.                     {% if product.nom | length > 30 %}
  25.                         {{ product.nom | slice(0, 29) }}...
  26.                     {% else %}
  27.                         {{ product.nom }}
  28.                     {% endif %}
  29.                     </span>
  30.               </a></h3>
  31.               <div class="d-flex justify-content-between">
  32.                 <div class="product-price"><span class="text-accent formated-number">{{ product.price }}</span> {{ devise }}</div>
  33.                 <div class="star-rating"><i class="sr-star czi-star-filled active"></i><i class="sr-star czi-star-filled active"></i><i class="sr-star czi-star-filled active"></i><i class="sr-star czi-star-filled active"></i><i class="sr-star czi-star-filled active"></i>
  34.                 </div>
  35.               </div>
  36.             </div>
  37.             {% if product.stockDisponible < 1 %}
  38.             <div class="card-body card-body-hidden"><a class="btn btn-secondary btn-sm btn-block mb-2" href="{{ path('display_product', {'leSlug':product.leSlug}) }}">Voir produit</a>
  39.             </div>
  40.             {% else %}
  41.             <div class="card-body card-body-hidden">
  42.                 <form action="{{ path('add_to_cart') }}">
  43.                 <input type="hidden" name="product" value="{{ product.id }}" />
  44.                 <input type="hidden" name="quantity" value="1" />
  45.                 <button class="btnAddToCart btn btn-primary btn-sm btn-block mb-2" type="button" data-toggle="toast" data-target="#cart-toast"><i class="czi-cart font-size-sm mr-1"></i>Ajouter au panier</button>
  46.                 </form>
  47.            </div>
  48.             {% endif %}
  49.           </div>
  50.           <hr class="d-sm-none">
  51.         </div>
  52.         {% endfor %}