templates/product/featured_product.html.twig line 1

Open in your IDE?
  1. {% for content in collection %}
  2.     <div class="row justify-content-center align-items-center">
  3.         <div class="col-lg-4">
  4.             <div class="img-wrapper">
  5.                 <img src="{{ content.thumbnail|media_url }}" alt="{{ content.title }}">
  6.             </div>
  7.         </div>
  8.         <div class="col-lg-5">
  9.             <h3 class="about-us-title">{{ content.title }}</h3>
  10.             <div class="price-wrapper">
  11.                 <span class="price-cart">{{ currency(content.price)}}</span>
  12.             </div>
  13.             <div class="cart-details-wrapper">
  14.                 <p>{{ content.summary }}</p>
  15.                 <div class="cart-details">
  16.                     <span class="cart-bold">Category: </span>
  17.                     <span>{{ content.term.name }}</span>
  18.                 </div>
  19.             </div>
  20.             <div class="cart-btn-wrapper d-flex">
  21.                 <form name="add-to-cart" action="{{ path('shopping_add_to_cart') }}" method="POST" class="add-to-cart" data-controller="add-to-cart" data-action="submit->add-to-cart#addToCart">
  22.                     <input type="hidden" name="productId" value="{{ content.id }}" />
  23.                     <div class="d-flex">
  24.                         <input type="number" name="qty"  class="form-control checkout-form-input" value="1" min="1">
  25.                         <button type="submit" class="btn btn-primary-fast mx-2 btn-add-to-cart" data-add-to-cart-target="submitButton">Add to Cart</button>
  26.                     </div>
  27.                 </form>
  28.             </div>
  29.         </div>
  30.     </div>
  31. {% endfor %}