templates/article/article.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Article | Webshop{% endblock %}
  3. {% block body %}
  4.     <div class="container-fluid">
  5.         <div class="row">
  6.             {% include 'sideBar.html.twig' %}
  7.             <div class="col-lg-9 borderPoint ml-3">
  8.                 <div class="row mt-3">
  9.                     <div class="col-md-4">
  10.                         <div class="card h-100 borderWebshop">
  11.                             {% if article.image %}
  12.                                 <img class="img-fluid rounded" src="/image/article/{{ article.image }}"
  13.                                      alt="article{{ article.id }}">
  14.                             {% else %}
  15.                                 <img class="img-fluid rounded" src="{{ asset('image/article/default.jpg') }}"
  16.                                      alt="article{{ article.id }}">
  17.                             {% endif %}
  18.                         </div>
  19.                     </div>
  20.                     <div class="col-md-8">
  21.                         <div class="row">
  22.                             <div class="col-12">
  23.                                 <h1>{{ article.name|capitalize }}</h1>
  24.                                 <div class="underline"></div>
  25.                             </div>
  26.                         </div>
  27.                         <div class="row">
  28.                             <div class="col-12">
  29.                                 <p class="bodyText pt-3">
  30.                                     {{ article.description }}
  31.                                 </p>
  32.                             </div>
  33.                         </div>
  34.                     </div>
  35.                 </div>
  36.                 {% if app.user %}
  37.                     <div class="container">
  38.                         <div class="row mt-5 text-center">
  39.                             <div class="col-md-4 borderWebshop" style="height: 5rem;">
  40.                                 <div class="mt-4">
  41.                                     {% if article.price.salePrice is defined %}
  42.                                         {% if article.price.salePrice > article.price.salePricePromo %}
  43.                                             <h4 class="text-center textPrice">
  44.                                                 <span class="promo">{{ article.price.salePrice|number_format(2) }}€</span>
  45.                                                 <span style="color:green">{{ article.price.salePricePromo|number_format(2) }}€ {% if article.isVaryingWeight %} /kg {% endif %}</span>
  46.                                             </h4>
  47.                                         {% else %}
  48.                                             <h4 class="text-center textPrice">{{ article.price.salePricePromo|number_format(2) }}
  49.                                                 € {% if article.isVaryingWeight %} /kg {% endif %}</h4>
  50.                                         {% endif %}
  51.                                     {% else %}
  52.                                         <h4 class="text-center textPrice">{{ article.price|number_format(2) }} €
  53.                                             {% if article.isVaryingWeight %} /kg {% endif %}</h4>
  54.                                     {% endif %}
  55.                                 </div>
  56.                             </div>
  57.                             {% if app.user %}
  58.                                 <div class="col-md-3 mt-4">
  59.                                     <button style="border: none; width: 110px;background-color: #fdeded; margin-top: -10px">
  60.                                         <div style="display: table-cell;vertical-align: middle;height: 50px;border: 1px solid #fdeded;">
  61.                                             <input type="number" id="qty{{ article.id }}"
  62.                                                    onchange="checkMaxQty({{ article.id }}, {{ article.maxQty }})"
  63.                                                    min="1"
  64.                                                    max="99"
  65.                                                    value="1">
  66.                                             <span> pcs &nbsp;</span>
  67.                                         </div>
  68.                                     </button>
  69.                                 </div>
  70.                                 <div class="col-md-2 pt-2 text-center" style="background-color: #fdeded">
  71.                                     <button class="btn icon-cart-red-big"
  72.                                             data-toggle="popover" data-trigger="hover"
  73.                                             data-content="{{ "article.addArticle" | trans }}"
  74.                                             onclick="addOrderArticle({{ article.id }})">
  75.                                     </button>
  76.                                 </div>
  77.                                 {% if article.technicalData %}
  78.                                     <div class="col-md-3">
  79.                                         <div class="row">
  80.                                             <div class="col">
  81.                                                 <a class="btn icon-document" target="_blank"
  82.                                                    href="{{ path('technicalData', {'id': article.id }) }}"
  83.                                                    data-toggle="popover" data-trigger="hover"></a>
  84.                                                 <p>Télécharger la fiche produit</p>
  85.                                             </div>
  86.                                         </div>
  87.                                     </div>
  88.                                 {% endif %}
  89.                             {% endif %}
  90.                         </div>
  91.                     </div>
  92.                 {% endif %}
  93.                 <div class="row mt-5">
  94.                     <div class="col-md-6 pt-2">
  95.                         <h3>Infos produits</h3>
  96.                         <div class="underline"></div>
  97.                         <div class="bodyTextRegular mt-3">
  98.                             {% if article.articleNumber or article.deliveryMin or article.weightAverage or article.packaging or article.availability %}
  99.                                 {% if article.articleNumber %}<p class="noSpacing"><span class="font-weight-bold">Numéro d'article:</span> {{ article.articleNumber }}
  100.                                     </p> {% endif %}
  101.                                 {% if article.deliveryMin %}<p class="noSpacing">DLC min. à la
  102.                                     livraison: {{ article.deliveryMin }} jours</p>{% endif %}
  103.                                 {% if article.weightAverage %}<p class="noSpacing">Poids
  104.                                     moyen: {{ article.weightAverage }} kg</p> {% endif %}
  105.                                 {% if article.packaging %}<p class="noSpacing">
  106.                                     Conditionnement: {{ article.packaging }}</p>{% endif %}<br>
  107.                                 {% if article.availability %}<p class="noSpacing">Disponibilité: sur
  108.                                     commande</p>{% endif %}
  109.                             {% else %}
  110.                                 <p class="bodyText noSpacing text-center mt-5">Aucune information sur ce produit</p>
  111.                             {% endif %}
  112.                         </div>
  113.                     </div>
  114.                     <div class="col-md-6 pt-2">
  115.                         <h3>Compositions</h3>
  116.                         <div class="underline"></div>
  117.                         <p class="mt-3">
  118.                             {% if article.ingredient %}
  119.                             {{ article.ingredient }}
  120.                             {% else %}
  121.                         <p class="noSpacing text-center mt-5">Aucune information sur ce produit</p>
  122.                         {% endif %}
  123.                         </p>
  124.                     </div>
  125.                 </div>
  126.                 {% if article.isIGP %}
  127.                     <div class="row mt-5">
  128.                         <div class="col-md-12">
  129.                             <h3>Produit certifié</h3>
  130.                             <div class="underline"></div>
  131.                             <div class="certifImg mt-3">
  132.                                 <img class="img-fluid rounded" src="{{ asset('design/images/certifIGP.svg') }}"
  133.                                      alt="certifIgp">
  134.                             </div>
  135.                         </div>
  136.                     </div>
  137.                 {% endif %}
  138.                 {% include('article/carousel.html.twig') %}
  139.             </div>
  140.         </div>
  141.     </div>
  142. {% endblock %}
  143. {% block javascripts %}
  144.     {{ parent() }}
  145.     <script src="{{ asset('js/entity/order/home.js') }}"></script>
  146. {% endblock %}