templates/product/showProductByCategory.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ category }} - Le Boutique Belge{% endblock %}
  3. {% block content %}
  4.     <h1 class="mb-5">{{ category }}</h1>
  5.     <div class="row product-container">
  6.         {% for product in productsByCategory %}
  7.             <div class="col-md-4 mb-5">
  8.                 <img src="/uploads/{{ product.illustration }}" alt="{{ product.name }}" class="img-fluid articleByCategory img-thumbnail">
  9.                 <h3>{{ product.name }}</h3>
  10.                 <p>{{ product.subtitle }}</p>
  11.                 <span class="product-page-price">{{ (product.price / 100) | number_format(2, ',', '.') }}</span>
  12.                 <hr>
  13.                 <p>{{ product.description }}</p>
  14.                 
  15.                 <div class="text-center">
  16.                     <a href="" class="btn btn-outline-warning">
  17.                         <i class="fas fa-heart"></i>
  18.                     </a>
  19.                     <a href="{{ path('add_to_cart', { 'id': product.id}) }}" class="btn btn-outline-primary">
  20.                         <i class="fas fa-cart-plus"></i>
  21.                     </a>
  22.                 </div>
  23.             </div>
  24.             
  25.             {% if loop.index % 3 == 0 %}
  26.                 </div><div class="row product-container">
  27.             {% endif %}
  28.         {% endfor %}
  29.     </div>
  30. {% endblock %}