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. <div class="text-center">
  15. <a href="" class="btn btn-outline-warning">
  16. <i class="fas fa-heart"></i>
  17. </a>
  18. <a href="{{ path('add_to_cart', { 'id': product.id}) }}" class="btn btn-outline-primary">
  19. <i class="fas fa-cart-plus"></i>
  20. </a>
  21. </div>
  22. </div>
  23. {% if loop.index % 3 == 0 %}
  24. </div><div class="row product-container">
  25. {% endif %}
  26. {% endfor %}
  27. </div>
  28. {% endblock %}