templates/Articles/Article/afficher.html.twig line 1

Open in your IDE?
  1. {% extends "layout.html.twig" %}
  2. {% block title %}{{ article.reference }} : {{ article.libelle }}{% endblock %}
  3. {% block body %}
  4.     <script src="{{ asset('js_ep/epobi_article.js') }}"></script>
  5.     <!-- page content -->
  6.     <style>
  7.         @keyframes bounce {
  8.             0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  9.             40% { transform: translateY(-5px); }
  10.             60% { transform: translateY(-3px); }
  11.         }
  12.     </style>
  13.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
  14.     <div class="right_col fiche_produit" role="main">
  15.         {% set images = dtc_image_article.getImages(article.id) %}
  16.         {% set slug = dtc_article.getslugifArticle(article) %}
  17.         <div class="col-lg-6 container_gallery_fiche_produit">
  18.             <div class="gallery-container-fiche-produit">
  19.                 <!-- Galerie principale -->
  20.                 <div class="swiper main">
  21.                     <div class="swiper-wrapper">
  22.                         {% if images|length > 0 %}
  23.                             {% for im in images  %}
  24.                                 {% set slugImage = dtc_article.getslugifImage(im) %}
  25.                                 {#  <img  src="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url) | imagine_filter('800x600') }}" alt=""> #}
  26.                                 <div class="swiper-slide"><img src="{{ url_image_distant }}/image/800/600/{{ im.ulid }}/{{ slugImage }}" alt="{{ slug }}"></div>
  27.                             {% endfor %}
  28.                         {% else %}
  29.                             <div class="swiper-slide"><img  src="{{ asset('images/defaut-img-product.jpg') }}" alt="{{ slug }}"></div>
  30.                         {% endif %}
  31.                     </div>
  32.                 </div>
  33.                 <!-- Miniatures -->
  34.                 <div class="swiper thumbs">
  35.                     <div class="swiper-wrapper">
  36.                         {% if images|length > 0 %}
  37.                             {% for im in images  %}
  38.                                 {% set slugImage = dtc_article.getslugifImage(im) %}
  39.                                 {# <div class="swiper-slide"><img src="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url) | imagine_filter('800x600') }}" alt=""></div>#}
  40.                                 <div class="swiper-slide"><img  src="{{ url_image_distant }}/image/800/600/{{ im.ulid }}/{{ slugImage }}" alt="{{ slug }}"></div>
  41.                             {% endfor %}
  42.                         {% else %}
  43.                             <div class="swiper-slide"><img src="{{ asset('images/defaut-img-product.jpg') }}" alt="{{ slug }}"></div>
  44.                         {% endif %}
  45.                     </div>
  46.                     <!-- Flèches miniatures -->
  47.                     {% if images|length > 1 %}
  48.                     <div class="swiper-thumbs-button-prev">&#10094;</div>
  49.                     <div class="swiper-thumbs-button-next">&#10095;</div>
  50.                     {% endif %}
  51.                 </div>
  52.             </div>
  53.          </div>
  54.         <script>
  55.             // Miniatures (thumbs) Swiper
  56.             const thumbsSwiper = new Swiper('.thumbs', {
  57.                 spaceBetween: 10,
  58.                 slidesPerView: 'auto', // permet de garder des carrés responsives
  59.                 watchSlidesProgress: true,
  60.                 navigation: {
  61.                     nextEl: '.swiper-thumbs-button-next',
  62.                     prevEl: '.swiper-thumbs-button-prev',
  63.                 },
  64.             });
  65.             // Galerie principale
  66.             const mainSwiper = new Swiper('.main', {
  67.                 spaceBetween: 10,
  68.                 effect: 'fade',
  69.                 loop: true,
  70.                 thumbs: {
  71.                     swiper: thumbsSwiper,
  72.                 },
  73.             });
  74.         </script>
  75.         <div class="col-lg-6 _x_panel" style="">
  76.             <h1 class="no-transform-text dark" style="margin-top:0px;">{{ article.libelle }}</h1>
  77.             <h2 class="no-transform-text dark" style="margin-top:0px;">{{ article.libelleSecondaire }}</h2>
  78.             <div style="margin-top:20px;">Référence : <b style='letter-spacing : 1px;font-family:"Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif';>{{ article.reference }}</b></div>
  79.             {% set remise = NULL %}
  80.             {% if app.user.id is defined  %}
  81.                 {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':article},app.user.client) %}
  82.             {% endif %}
  83.             {% if remise.remiseId is not defined or remise.remiseId == ""  %}
  84.             <div class="" style="padding-left : 0px;">
  85.                 <div class="_col-12 price-container" style="margin-top:15px;margin-bottom:30px;padding-top:5px;width:auto;">
  86.                     <span class="new-price">
  87.                         {% if app.user.id is defined  %}
  88.                             <span class="no-transform-text">Tarif net :</span>  {{ article.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span>
  89.                         {% else %}
  90.                             {% set prix_ttc = dtc_article.getPrixVenteTtc(article) %}
  91.                             <span class="no-transform-text">Tarif net :</span> {{ prix_ttc|price|raw }}&nbsp;€<span class="price-ttc">TTC</span>
  92.                         {% endif %}
  93.                     </span>
  94.                 </div>
  95.                 <div class="clearfix"></div>
  96.                 {% if article.marque.id is defined  != "" and article.marque.logo != "" %}
  97.                <img class="logo_marque_page_article" src="{{ asset('/uploads/logos/marques/' ~ article.marque.id ~ '/' ~ article.marque.logo) | imagine_filter('H400x300') }}">
  98.                 {% endif %}
  99.             </div>
  100.             {% endif %}
  101.             <div class="both"></div>
  102.             {% if remise.remiseId is defined and remise.remiseId > 0 %}
  103.             <div class="col-lg-12 col-12" style="padding-left : 0px;">
  104.                 <div class=" price-container" style="margin-top:20px;margin-bottom:35px;">
  105.                     <div style="font-size:1.4em;">
  106.                         <span class="droite new-price gray" style="font-size:1em;"><span style="font-size:0.8em;">Tarif&nbsp;public&nbsp;<br></span> {{ article.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></span>
  107.                     </div>
  108.                     <div class="both"></div>
  109.                     <div style="line-height: 1.05;">
  110.                         <span class="droite new-price" style="color:white;"><span style="font-size:0.55em;color:white;">Tarif&nbsp;remisé <br></span> {{ remise.prixRemise|price|raw }}&nbsp;€<span class="price-ttc">HT</span></span>
  111.                     </div>
  112.                     <div style="_position:absolute;" class="discount">-{{ remise.valeur }}%</div>
  113.                 </div>
  114.                 {% if article.marque.id is defined  != "" and article.marque.logo != "" %}
  115.                     <div><img class="both logo_marque_page_article" src="{{ asset('/uploads/logos/marques/' ~ article.marque.id ~ '/' ~ article.marque.logo) | imagine_filter('H400x300') }}" style=""></div>
  116.                 {% endif %}
  117.             </div>
  118.             {% endif %}
  119.             <div style="_min-height:100px;">
  120.                 <div class="both"></div>
  121.                 <ul class="quick-list" style="margin-top:5px;">
  122.                     {% if article.marque.id is defined %}
  123.                     <li><i class="fa fa-star"></i>{{ article.marque.libelle }}</li>
  124.                     {% endif %}
  125.                     {% if article.poids > 0 %}
  126.                         <li ><i class="fa fa-dashboard"></i><span id="ouvrir-notices" style="cursor:pointer;">{{ article.poids }} Kg</span></li>
  127.                     {% endif %}
  128.                     {% if article.largeur > 0 and article.hauteur > 0 and article.profondeur > 0 %}
  129.                         <li ><i class="fa fa-arrows"></i><span id="ouvrir-notices" style="cursor:pointer;">{{ article.largeur }} cm x {{ article.hauteur }} cm x {{ article.profondeur }} cm</span></li>
  130.                     {% endif %}
  131.                     <li class="no-transform-text"><i class="fa fa-envelope"></i><a data-link="{{ path ("dtc_contact_modal", {"article":article.id} ) }}" class="open-modal-form" data-taille="" data-target="#blocModal" data-toggle="modal" href="#">Demander des informations sur ce produit</a> </li>
  132.                     {% if 1!=1 and article.documents|length > 0 %}
  133.                         <li ><i class="fa fa-file-pdf-o"></i><span id="ouvrir-notices" style="cursor:pointer;">Notices</span></li>
  134.                     {% endif %}
  135.                     {% if 1!=1 and articleOptions|length > 0 %}
  136.                         <li ><i class="fa fa-cubes"></i><span id="ouvrir-options" style="cursor:pointer;">Options</span></li>
  137.                     {% endif %}
  138.                     {% if 1!=1 and articleComplements|length > 0 %}
  139.                         <li ><i class="fa fa-cubes"></i><span id="ouvrir-complements" style="cursor:pointer;">Compléments</span></li>
  140.                     {% endif %}
  141.                     {% if 1!=1 and articleComposants|length > 0 %}
  142.                         <li ><i class="fa fa-cubes"></i><span id="ouvrir-composants" style="cursor:pointer;">Composants</span></li>
  143.                     {% endif %}
  144.                     {% if article.dispo > 0 %}
  145.                         <li class="green etat_stock_en_stock"><i class="fa fa-circle etat_stock_en_stock"></i>En stock ({{ article.dispo }})</li>
  146.                     {% else %}
  147.                         {% set datesProchainesDispo = dtc_article.getDatesProchainesDispo(article.id) %}
  148.                         {% if datesProchainesDispo|length > 0 %}
  149.                             <li class="yellow etat_stock_reappro"><i class="fa fa-circle yellow etat_stock_reappro"></i>En approvisionement :
  150.                                 {% for d in datesProchainesDispo %}
  151.                                     <div>{{ d.quantite }} entrée{% if d.quantite > 1 %}s{% endif %} en stock prévue{% if d.quantite > 1 %}s{% endif %} {% if d.date != "" %}le  {{ d.date|date("d/m/Y") }}{% else %} (date à confirmer){% endif %} </div>
  152.                                 {% endfor %}
  153.                             </li>
  154.                         {% else %}
  155.                             <li class="etat_stock_sur_commande orange"><i class="etat_stock_sur_commande fa fa-circle orange"></i>Sur commande</li>
  156.                         {% endif %}
  157.                     {% endif %}
  158.                     {% if articleComplements|length > 0 %}
  159.                     <li class="off"><a id="articleComplements_{{ article.id }}" data-link="{{ path ("dtc_article_complement_modal", {"id":article.id} ) }}" class="open-modal-form" data-taille="modal-lg" data-target="#blocModal" data-toggle="modal" href="#"></a></li>
  160.                     {% endif %}
  161.                 </ul>
  162.                 <style>
  163.                     .pdf-card img {
  164.                         object-fit: cover;
  165.                         transition: transform 0.3s;
  166.                     }
  167.                     .pdf-card:hover img {
  168.                         transform: scale(1.05);
  169.                     }
  170.                     .pdf-card img {
  171.                         width: 100%;
  172.                         max-height: 150px; /* limite sans déformer */
  173.                         min-height: 150px; /* limite sans déformer */
  174.                         height: auto;
  175.                     }
  176.                 </style>
  177.                 {% if catalogues|length >0  %}
  178.                     {% for p in catalogues %}
  179.                         {% if p.document.dossier == "catalogue" or  p.document.dossier == "fiche" %}
  180.                             {% set url_img = asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) %}
  181.                             {% set url_img = url_img|replace({".pdf":".jpg"}) %}
  182.                             <div class="bloc-pdf-catalogue col-2 col-sm-4 col-md-3 col-lg-2 d-flex mb-1">
  183.                                 <div class="card pdf-card _h-100 w-100">
  184.                                     <a title="Télécharger le catalogue" target="_blank" href="{{ asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) }}">
  185.                                         <img src="{{ url_img }}" class="img-responsive-custom card-img-top" alt="Miniature PDF">
  186.                                     </a>
  187.                                 </div>
  188.                             </div>
  189.                         {% endif %}
  190.                     {% endfor %}
  191.                     <div class="both"></div>
  192.                 {% endif %}
  193.             </div>
  194.             <div class="bloc_add_panier d-flex align-items-stretch mt-3" style="width:100%; max-width:320px;">
  195.                 <input id="quantite" name="quantite" type="number" class="mr-2 text-center form-control" style="width:100px;" value="1">
  196.                 {% if app.user.id is defined %}
  197.                 <button data-id="{{ article.id }}" href="" style="width:200px;" class="btn-ajouter-panier gauche bottom-link btn btn-success">
  198.                     <span class="fa fa fa-shopping-cart"></span> Ajouter au panier
  199.                 </button>
  200.                 {% else  %}
  201.                     <a href="/login" style="width:200px;" class="btn-ajouter-panier gauche bottom-link btn btn-success"><span class="fa fa fa-shopping-cart"></span> Ajouter au panier</a>
  202.                 {% endif %}
  203.             </div>
  204.         </div>
  205.         <div class="col-lg-12 x_panel container_tab_fiche_produit" style="margin-top:15px;">
  206.             <div class="tabs-scroll">
  207.             <ul class="nav nav-tabs bar_tabs " id="myTab" role="tablist">
  208.                 <li class="nav-item">
  209.                     <a class="nav-link active" id="description-tab" data-toggle="tab" href="#description" role="tab" aria-controls="description" aria-selected="true">Description</a>
  210.                 </li>
  211.                 <li class="nav-item">
  212.                     <a class="nav-link" id="applications-tab" data-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="false">Compatibilité</a>
  213.                 </li>
  214.                 {% if
  215.                     article.referenceAppel1 != ""
  216.                     or
  217.                     article.referenceAppel2 != ""
  218.                     or
  219.                     article.referenceAppel3 != ""
  220.                     or
  221.                     article.referenceAppel4 != ""
  222.                     or
  223.                     article.referenceAppel5 != ""
  224.                     or
  225.                     article.referenceAppel6 != ""
  226.                     or
  227.                     article.referenceAppel7 != ""
  228.                     or
  229.                     article.referenceAppel8 != ""
  230.                     or
  231.                     article.referenceAppel9 != ""
  232.                     or
  233.                     article.referenceAppel10 != ""
  234.                 %}
  235.                 <li class="nav-item">
  236.                     <a class="nav-link" id="equivalences-tab" data-toggle="tab" href="#equivalences" role="tab" aria-controls="equivalences" aria-selected="false">Équivalences</a>
  237.                 </li>
  238.                 {% endif %}
  239.                 {% if article.documents|length > 0 %}
  240.                 <li class="nav-item">
  241.                     <a class="nav-link" id="notices-tab" data-toggle="tab" href="#notices" role="tab" aria-controls="notices" aria-selected="false">Notices ({{ article.documents|length }})</a>
  242.                 </li>
  243.                 {% endif %}
  244.                 {% if articleOptions|length > 0 %}
  245.                 <li class="nav-item">
  246.                     <a class="nav-link" id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options ({{ articleOptions|length }})</a>
  247.                 </li>
  248.                 {% endif %}
  249.                 {% if articleComplements|length > 0 %}
  250.                 <li class="nav-item">
  251.                     <a class="nav-link" id="complements-tab" data-toggle="tab" href="#complements" role="tab" aria-controls="complements" aria-selected="false">Compléments ({{ articleComplements|length }})</a>
  252.                 </li>
  253.                 {% endif %}
  254.                 {% if articleComposants|length > 0 %}
  255.                 <li class="nav-item">
  256.                     <a class="nav-link" id="composants-tab" data-toggle="tab" href="#composants" role="tab" aria-controls="composants" aria-selected="false">Composants ({{ articleComposants|length }})</a>
  257.                 </li>
  258.                 {% endif %}
  259.             </ul>
  260.             </div>
  261.             <div class="tab-content" id="myTabContent">
  262.                 <div class="no-transform-text tab-pane fade show active" id="description" role="tabpanel" aria-labelledby="description-tab" style="padding-bottom:10px;">
  263.                     {{ article.description|raw }}
  264.                 </div>
  265.                 {% if articleComposants|length > 0 %}
  266.                 <div class=" tab-pane fade" id="composants" role="tabpanel" aria-labelledby="composants-tab">
  267.                     <ul id="liste_composants" class="list-group">
  268.                         {% for ac in articleComposants %}
  269.                         <!-- Composant 1 -->
  270.                         <li class="list-group-item">
  271.                             {% set slug = dtc_article.getslugifArticle(ac.article) %}
  272.                             <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">
  273.                                 {% set images = dtc_image_article.getImageDefaut(ac.article.id) %}
  274.                                 {% if images[0] is defined %}
  275.                                     {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  276.                                    {# <img class="card-img-top" alt="{{ ac.article.libelle }}" src="{{ asset(images[0].getUploadDir ~ '/' ~ ac.article.id ~ '/' ~ images[0].url) | imagine_filter('400x300') }}" style="max-width:100%;">#}
  277.                                     <img class="card-img-top" alt="{{ ac.article.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  278.                                 {% else %}
  279.                                     <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  280.                                 {% endif %}
  281.                             </a>
  282.                             <div class="component-text flex-grow-1">
  283.                                 <div class="text-muted">  <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">Réf: {{ ac.article.reference }}</a></div>
  284.                                 <div class="no-transform-text dark">  <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">{{ ac.article.libelle }}</a></div>
  285.                             </div>
  286.                             <span class="badge badge-info badge-qty">Quantité: {{ ac.quantite }}</span>
  287.                         </li>
  288.                         {% endfor %}
  289.                     </ul>
  290.                 </div>
  291.                 {% endif %}
  292.                 <div class="tab-pane fade" id="applications" role="tabpanel" aria-labelledby="applications-tab">
  293.                     {% if article.universel == 1 %}
  294.                         <div style="padding-bottom:10px;">Produit compatible avec tous les types de véhicules.</div>
  295.                     {% endif %}
  296.                     {% set applications = dtc_article.getApplicationsArticle(article) %}
  297.                     {% if applications|length > 0 %}
  298.                         {% for app in applications %}
  299.                             <div>{{ app.libelle_marque }}</div>
  300.                             {% if app.modeles|length > 0 %}
  301.                                 <ul>
  302.                                     {% for m in app.modeles %}
  303.                                         <li><b>{{ m.libelle_modele }}</b></li>
  304.                                         {% if m.types|length > 0 %}
  305.                                             <ul>
  306.                                                 {% for t in m.types %}
  307.                                                     <li>{{ t.libelle_type }}</li>
  308.                                                 {% endfor  %}
  309.                                             </ul>
  310.                                         {% endif %}
  311.                                     {% endfor %}
  312.                                 </ul>
  313.                             {% endif  %}
  314.                             <div class="both" style="height:10px;"></div>
  315.                         {% endfor %}
  316.                     {% endif %}
  317.                 </div>
  318.                 <div class="tab-pane fade" id="options" role="tabpanel" aria-labelledby="options-tab">
  319.                     {% if articleOptions|length > 0 %}
  320.                     <div class="row">
  321.                         {% for o in articleOptions %}
  322.                             <div class="col-lg-2 col-md-6 mb-4 col-6">
  323.                                 <div class="card-options-fiche-produit h-100 shadow-sm">
  324.                                     {% set slug = dtc_article.getslugifArticle(o.enfant) %}
  325.                                     <a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">
  326.                                     {% set images = dtc_image_article.getImageDefaut(o.enfant.id) %}
  327.                                     {% if images[0] is defined %}
  328.                                         {# <img class="card-img-top" alt="{{ o.enfant.libelle }}" src="{{ asset(images[0].getUploadDir ~ '/' ~ o.enfant.id ~ '/' ~ images[0].url) | imagine_filter('400x300') }}" style="max-width:100%;">#}
  329.                                         {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  330.                                         {# <div class="swiper-slide"><img src="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url) | imagine_filter('800x600') }}" alt=""></div>#}
  331.                                         <img class="card-img-top" alt="{{ o.enfant.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  332.                                     {% else %}
  333.                                         <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  334.                                     {% endif %}
  335.                                     </a>
  336.                                     <div class="card-body text-center">
  337.                                         <div class="d-flex align-items-center justify-content-center mb-2">
  338.                                             <span class="product-ref"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">Réf: {{ o.enfant.reference }}</a></span>
  339.                                         </div>
  340.                                         <h5 class="card-title dark" style="font-size:1em;"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">{{ o.enfant.libelle }}</a></h5>
  341.                                         {% set remise = NULL %}
  342.                                         {% if app.user.id is defined  %}
  343.                                             {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':o.enfant},app.user.client) %}
  344.                                         {% endif %}
  345.                                         {% if remise.remiseId is defined and remise.remiseId > 0 %}
  346.                                             <div style="margin-bottom:10px;">
  347.                                                 <div class="old-price-parent">
  348.                                                     <span class="old-price" style="font-size:1.2em;"><b>{{ o.enfant.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></b></span>
  349.                                                 </div>
  350.                                                 <div style="margin-top:5px;">
  351.                                                     <div class="discount" style="font-size:0.8em;display:inline;">Remise pro -{{ remise.valeur }}%</div>
  352.                                                 </div>
  353.                                                 <div style="margin-top:5px;">
  354.                                                     <span class=" new-price" style="font-size:1.2em;"><span style="font-size:1.4em;">{{ remise.prixRemise|price }}&nbsp;€<span class="price-ttc">HT</span></span></span>
  355.                                                     <div class="both"></div>
  356.                                                 </div>
  357.                                             </div>
  358.                                             <div class="both"></div>
  359.                                         {% else %}
  360.                                             <p class="card-text">
  361.                                             {% if app.user.id is defined  %}
  362.                                                 <span class="card-price">{{ o.enfant.prixVente|price|raw }}&nbsp;&euro; HT</span>
  363.                                             {% else %}
  364.                                                 {% set prix_ttc = dtc_article.getPrixVenteTtc(o.enfant) %}
  365.                                                 <span class="card-price">{{ prix_ttc|price|raw }}&nbsp;&euro; TTC</span>
  366.                                             {% endif %}
  367.                                             </p>
  368.                                         {% endif %}
  369.                                         {% if app.user.id is defined %}
  370.                                             <button data-texte="<span class='fa fa fa-shopping-cart'></span> Ajouter" data-id="{{ o.enfant.id }}" style="" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</button>
  371.                                         {% else  %}
  372.                                             <a href="/login" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</a>
  373.                                         {% endif %}
  374.                                     </div>
  375.                                 </div>
  376.                             </div>
  377.                         {% endfor %}
  378.                     </div>
  379.                     {% endif %}
  380.                 </div>
  381.                 <div class="tab-pane fade" id="complements" role="tabpanel" aria-labelledby="complements-tab">
  382.                     {% if articleComplements|length > 0 %}
  383.                         <div class="row">
  384.                             {% for o in articleComplements %}
  385.                                 <div class="col-lg-2 col-md-6 mb-4 col-6">
  386.                                     <div class="card-options-fiche-produit h-100 shadow-sm">
  387.                                         {% set slug = dtc_article.getslugifArticle(o.enfant) %}
  388.                                         <a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">
  389.                                             {% set images = dtc_image_article.getImageDefaut(o.enfant.id) %}
  390.                                             {% if images[0] is defined %}
  391.                                                 {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  392.                                                 <img class="card-img-top" alt="{{ o.enfant.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  393.                                             {% else %}
  394.                                                 <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  395.                                             {% endif %}
  396.                                         </a>
  397.                                         <div class="card-body text-center">
  398.                                             <div class="d-flex align-items-center justify-content-center mb-2">
  399.                                                 <span class="product-ref"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">Réf: {{ o.enfant.reference }}</a></span>
  400.                                             </div>
  401.                                             <h5 class="card-title dark" style="font-size:1em;"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">{{ o.enfant.libelle }}</a></h5>
  402.                                             {% set remise = NULL %}
  403.                                             {% if app.user.id is defined  %}
  404.                                                 {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':o.enfant},app.user.client) %}
  405.                                             {% endif %}
  406.                                             {% if remise.remiseId is defined and remise.remiseId > 0 %}
  407.                                                 <div style="margin-bottom:10px;">
  408.                                                     <div>
  409.                                                         <span class="old-price" style="font-size:1.2em;"><b>{{ o.enfant.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></b></span>
  410.                                                     </div>
  411.                                                     <div style="margin-top:5px;">
  412.                                                         <div class="discount" style="font-size:0.8em;display:inline;">Remise pro -{{ remise.valeur }}%</div>
  413.                                                     </div>
  414.                                                     <div style="margin-top:5px;">
  415.                                                         <span class=" new-price" style="font-size:1.2em;"><span style="font-size:1.4em;">{{ remise.prixRemise|price }}&nbsp;€<span class="price-ttc">HT</span></span></span>
  416.                                                         <div class="both"></div>
  417.                                                     </div>
  418.                                                 </div>
  419.                                                 <div class="both"></div>
  420.                                             {% else %}
  421.                                                 <p class="card-text">
  422.                                                     {% if app.user.id is defined  %}
  423.                                                         <span class="card-price">{{ o.enfant.prixVente|price|raw }}&nbsp;&euro; HT</span>
  424.                                                     {% else %}
  425.                                                         {% set prix_ttc = dtc_article.getPrixVenteTtc(o.enfant) %}
  426.                                                         <span class="card-price">{{ prix_ttc|price|raw }}&nbsp;&euro; TTC</span>
  427.                                                     {% endif %}
  428.                                                 </p>
  429.                                             {% endif %}
  430.                                             <input id="quantite" name="quantite" type="hidden" class="gauche text-center form-control" style="width:100%;" value="{{ o.multiple}}">
  431.                                             <div class="both"></div>
  432.                                             {% if app.user.id is defined %}
  433.                                                 <button data-texte="<span class='fa fa fa-shopping-cart'></span> Ajouter" data-id="{{ o.enfant.id }}" style="" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</button>
  434.                                             {% else  %}
  435.                                                 <a href="/login" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</a>
  436.                                             {% endif %}
  437.                                         </div>
  438.                                     </div>
  439.                                 </div>
  440.                             {% endfor %}
  441.                         </div>
  442.                     {% endif %}
  443.                 </div>
  444.                 <div class="tab-pane fade" id="notices" role="tabpanel" aria-labelledby="notices-tab">
  445.                     {% if article.documents|length > 0 %}
  446.                         <ul class="list-group list-group-flush liste_notices">
  447.                         {% for im in article.documents  %}
  448.                             <li class="list-group-item d-flex justify-content-between align-items-center file-item">
  449.                                 <div><i class="fa fa-file-pdf-o  fa-file-pdf file-icon mr-2"></i> {{ im.url }}</div>
  450.                                 <a href="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url)  }}" class="btn btn-outline-primary btn-sm" download>
  451.                                     <i class="fa fa-download"></i> Télécharger
  452.                                 </a>
  453.                             </li>
  454.                         {% endfor %}
  455.                     </ul>
  456.                     {% endif %}
  457.                 </div>
  458.                 <div class="tab-pane fade" id="equivalences" role="tabpanel" aria-labelledby="equivalences-tab">
  459.                     <div id="liste_ref_equivalances">
  460.                         <ul class="list-group list-group-flush">
  461.                             {% if article.referenceAppel1  != "" %}
  462.                                 <li class="list-group-item">
  463.                                     <div class="list-left">
  464.                                         <div>
  465.                                             <p class="item-title">{{ article.referenceAppel1 }}</p>
  466.                                            {#  <p class="item-sub">.</p> #}
  467.                                         </div>
  468.                                     </div>
  469.                                 </li>
  470.                             {% endif %}
  471.                             {% if article.referenceAppel2  != "" %}
  472.                                 <li class="list-group-item">
  473.                                     <div class="list-left">
  474.                                         <div>
  475.                                             <p class="item-title">{{ article.referenceAppel2 }}</p>
  476.                                         </div>
  477.                                     </div>
  478.                                 </li>
  479.                             {% endif %}
  480.                             {% if article.referenceAppel3  != "" %}
  481.                                 <li class="list-group-item">
  482.                                     <div class="list-left">
  483.                                         <div>
  484.                                             <p class="item-title">{{ article.referenceAppel3 }}</p>
  485.                                             <p class="item-sub">.</p>
  486.                                         </div>
  487.                                     </div>
  488.                                 </li>
  489.                             {% endif %}
  490.                             {% if article.referenceAppel4  != "" %}
  491.                                 <li class="list-group-item">
  492.                                     <div class="list-left">
  493.                                         <div>
  494.                                             <p class="item-title">{{ article.referenceAppel4 }}</p>
  495.                                             <p class="item-sub">.</p>
  496.                                         </div>
  497.                                     </div>
  498.                                 </li>
  499.                             {% endif %}
  500.                             {% if article.referenceAppel5  != "" %}
  501.                                 <li class="list-group-item">
  502.                                     <div class="list-left">
  503.                                         <div>
  504.                                             <p class="item-title">{{ article.referenceAppel5 }}</p>
  505.                                         </div>
  506.                                     </div>
  507.                                 </li>
  508.                             {% endif %}
  509.                             {% if article.referenceAppel6  != "" %}
  510.                                 <li class="list-group-item">
  511.                                     <div class="list-left">
  512.                                         <div>
  513.                                             <p class="item-title">{{ article.referenceAppel6 }}</p>
  514.                                         </div>
  515.                                     </div>
  516.                                 </li>
  517.                             {% endif %}
  518.                             {% if article.referenceAppel7  != "" %}
  519.                                 <li class="list-group-item">
  520.                                     <div class="list-left">
  521.                                         <div>
  522.                                             <p class="item-title">{{ article.referenceAppel7 }}</p>
  523.                                         </div>
  524.                                     </div>
  525.                                 </li>
  526.                             {% endif %}
  527.                             {% if article.referenceAppel8  != "" %}
  528.                                 <li class="list-group-item">
  529.                                     <div class="list-left">
  530.                                         <div>
  531.                                             <p class="item-title">{{ article.referenceAppel8 }}</p>
  532.                                         </div>
  533.                                     </div>
  534.                                 </li>
  535.                             {% endif %}
  536.                             {% if article.referenceAppel9  != "" %}
  537.                                 <li class="list-group-item">
  538.                                     <div class="list-left">
  539.                                         <div>
  540.                                             <p class="item-title">{{ article.referenceAppel9 }}</p>
  541.                                         </div>
  542.                                     </div>
  543.                                 </li>
  544.                             {% endif %}
  545.                             {% if article.referenceAppel10  != "" %}
  546.                                 <li class="list-group-item">
  547.                                     <div class="list-left">
  548.                                         <div>
  549.                                             <p class="item-title">{{ article.referenceAppel10 }}</p>
  550.                                         </div>
  551.                                     </div>
  552.                                 </li>
  553.                             {% endif %}
  554.                         </ul>
  555.                     </div>
  556.                 </div>
  557.             </div>
  558.         </div>
  559.     </div>
  560.     <!-- /page content -->
  561. {% endblock %}