templates/products/details.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Détails de {{ productProperties.name }} {% endblock %}
  3. {% block body %}
  4.     {% block block_navstart %} {% include "_partials/_nav.html.twig" %} {% endblock %}
  5.     <!-- detail-product -->
  6.     <section class="detail-product">
  7.         <div class="container">
  8.             <div class="row">
  9.                 <div class="col-md-5">
  10.                     <h1><strong>{{ productProperties.name }}</strong></h1>
  11.                     <img src="{{ asset('uploads/images/' ~ productProperties.imageFileName) }}" 
  12.                                     alt="{{ productProperties.name }}" class="img-fluid" style="width: 400px; height: 400px;" />
  13.                     {# <p>{{ productProperties.description }}</p> #}
  14.                     <p>Catégorie : <strong>{{ productProperties.categories.name }}</strong></p>
  15.                     <p>Prix : <strong>{{ productProperties.price }}FCFA</strong></p> 
  16.                     {% if productProperties.stock > 0 %}
  17.                         <p>Stock disponible : <strong>{{ productProperties.stock }}</strong></p>  
  18.                         <p> 
  19.                             <a href=#"{{ path('cart_add', {id: productProperties.id}) }}" class="btn btn-success btn-sm">Ajouter au panier</a>
  20.                             <a href="{{ path('app_profile_home', {id: productProperties.users.id}) }}" class="btn btn-primary btn-sm">Profile Auteur</a>
  21.                             <a href="{{ path('app_products_similars', {catego: productProperties.categories.id}) }}" class="btn btn-secondary btn-sm">Produits similaires</a> 
  22.                             {% set i = 0 %}
  23.                             {% for statElem in allStatistiques %}
  24.                                 {% if productProperties.id == statElem.idElement and statElem.page == 'DETAIL_PRODUCT' %}
  25.                                     {% set i = i + 1 %}
  26.                                 {% endif %}
  27.                             {% endfor %}  
  28.                             {% include '_partials/_compteur_vues.html.twig' %}      {## COMPTEUR_VUES ##}
  29.                         </p> 
  30.                     {% else %}
  31.                         <p class="text-danger">Temporairement en rupture de stock</p>
  32.                     {% endif %}
  33.                 </div>
  34.                 <div class="col-md-7">
  35.                     <p>{{ productProperties.description }}</p>
  36.                     <h1><strong>Autres détails</strong></h1>
  37.                     {% if productProperties.imageFileOthers is not null %}
  38.                         {% for image in productProperties.imageFileOthers %}
  39.                             <img src="{{ asset('uploads/images/' ~ image) }}" 
  40.                                     alt="Photo-non" class="img-fluid" style="width: 300px; height: 300px;" />
  41.                         {% endfor %}
  42.                     {% endif %}
  43.                 </div>
  44.             </div>
  45.         </div>
  46.     </section>
  47. {% endblock %}