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 {% if app.user.id is defined %}({{ article.dispo }}){% endif %}</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.                             {% if app.user.id is defined %}
  151.                                 {% for d in datesProchainesDispo %}
  152.                                     <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>
  153.                                 {% endfor %}
  154.                                 {% endif %}
  155.                             </li>
  156.                         {% else %}
  157.                             <li class="etat_stock_sur_commande orange"><i class="etat_stock_sur_commande fa fa-circle orange"></i>Sur commande</li>
  158.                         {% endif %}
  159.                     {% endif %}
  160.                     {% if articleComplements|length > 0 %}
  161.                     <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>
  162.                     {% endif %}
  163.                 </ul>
  164.                 {% if 1!=1 and catalogues|length >0  %}
  165.                     {% for p in catalogues %}
  166.                         {% if p.document.dossier == "catalogue" or  p.document.dossier == "fiche" %}
  167.                             {% set url_img = asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) %}
  168.                             {% set url_img = url_img|replace({".pdf":".jpg"}) %}
  169.                             <div class="bloc-pdf-catalogue col-2 col-sm-4 col-md-3 col-lg-2 d-flex mb-1">
  170.                                 <div class="card pdf-card _h-100 w-100">
  171.                                     <a title="Télécharger le catalogue" target="_blank" href="{{ asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) }}">
  172.                                         <img src="{{ url_img }}" class="img-responsive-custom card-img-top" alt="Miniature PDF">
  173.                                     </a>
  174.                                 </div>
  175.                             </div>
  176.                         {% endif %}
  177.                     {% endfor %}
  178.                     <div class="both"></div>
  179.                 {% endif %}
  180.             </div>
  181.             <div class="bloc_add_panier d-flex align-items-stretch mt-3" style="width:100%; max-width:320px;">
  182.                 <input id="quantite" name="quantite" type="number" class="mr-2 text-center form-control" style="width:100px;" value="1">
  183.                 {% if app.user.id is defined %}
  184.                 <button data-id="{{ article.id }}" href="" style="width:200px;" class="btn-ajouter-panier gauche bottom-link btn btn-success">
  185.                     <span class="fa fa fa-shopping-cart"></span> Ajouter au panier
  186.                 </button>
  187.                 {% else  %}
  188.                     <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>
  189.                 {% endif %}
  190.             </div>
  191.         </div>
  192.         <div class="col-lg-12 x_panel container_tab_fiche_produit" style="margin-top:15px;">
  193.             <div class="tabs-scroll">
  194.             <ul class="nav nav-tabs bar_tabs " id="myTab" role="tablist">
  195.                 <li class="nav-item">
  196.                     <a class="nav-link active" id="description-tab" data-toggle="tab" href="#description" role="tab" aria-controls="description" aria-selected="true">Description</a>
  197.                 </li>
  198.                 <li class="nav-item">
  199.                     <a class="nav-link" id="applications-tab" data-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="false">Compatibilité</a>
  200.                 </li>
  201.                 {% if
  202.                     article.referenceAppel1 != ""
  203.                     or
  204.                     article.referenceAppel2 != ""
  205.                     or
  206.                     article.referenceAppel3 != ""
  207.                     or
  208.                     article.referenceAppel4 != ""
  209.                     or
  210.                     article.referenceAppel5 != ""
  211.                     or
  212.                     article.referenceAppel6 != ""
  213.                     or
  214.                     article.referenceAppel7 != ""
  215.                     or
  216.                     article.referenceAppel8 != ""
  217.                     or
  218.                     article.referenceAppel9 != ""
  219.                     or
  220.                     article.referenceAppel10 != ""
  221.                 %}
  222.                 <li class="nav-item">
  223.                     <a class="nav-link" id="equivalences-tab" data-toggle="tab" href="#equivalences" role="tab" aria-controls="equivalences" aria-selected="false">Équivalences</a>
  224.                 </li>
  225.                 {% endif %}
  226.                 {% if article.documents|length > 0 %}
  227.                 <li class="nav-item">
  228.                     <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>
  229.                 </li>
  230.                 {% endif %}
  231.                 {% if articleOptions|length > 0 %}
  232.                 <li class="nav-item">
  233.                     <a class="nav-link" id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options ({{ articleOptions|length }})</a>
  234.                 </li>
  235.                 {% endif %}
  236.                 {% if articleComplements|length > 0 %}
  237.                 <li class="nav-item">
  238.                     <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>
  239.                 </li>
  240.                 {% endif %}
  241.                 {% if articleComposants|length > 0 %}
  242.                 <li class="nav-item">
  243.                     <a class="nav-link" id="composants-tab" data-toggle="tab" href="#composants" role="tab" aria-controls="composants" aria-selected="false">Composants ({{ articleComposants|length }})</a>
  244.                 </li>
  245.                 {% endif %}
  246.                 {% if catalogues|length >0  %}
  247.                     <li class="nav-item">
  248.                         <a class="nav-link" id="catalogues-tab" data-toggle="tab" href="#catalogues" role="tab" aria-controls="catalogues" aria-selected="false">Catalogues ({{ catalogues|length }})</a>
  249.                     </li>
  250.                 {% endif %}
  251.             </ul>
  252.             </div>
  253.             <div class="tab-content" id="myTabContent">
  254.                 <div class="no-transform-text tab-pane fade show active" id="description" role="tabpanel" aria-labelledby="description-tab" style="padding-bottom:10px;">
  255.                     {{ article.description|raw }}
  256.                 </div>
  257.                 {% if catalogues|length > 0 %}
  258.                 <div class=" tab-pane fade" id="catalogues" role="tabpanel" aria-labelledby="catalogues-tab">
  259.                     {% for p in catalogues %}
  260.                         {% if p.document.dossier == "catalogue" or  p.document.dossier == "fiche" %}
  261.                             {% set url_img = asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) %}
  262.                             {% set url_img = url_img|replace({".pdf":".jpg"}) %}
  263.                             <div class="bloc-pdf-catalogue col-4 col-sm-4 col-md-3 col-lg-1 d-flex mb-1">
  264.                                 <div class="card pdf-card _h-100 w-100">
  265.                                     <a title="Télécharger le catalogue" target="_blank" href="{{ asset('uploads/societe/'~p.document.dossier~'/'~p.document.url) }}">
  266.                                         <img src="{{ url_img }}" class="img-responsive-custom card-img-top" alt="Miniature PDF">
  267.                                     </a>
  268.                                 </div>
  269.                             </div>
  270.                         {% endif %}
  271.                     {% endfor %}
  272.                 </div>
  273.                 {% endif %}
  274.                 {% if articleComposants|length > 0 %}
  275.                 <div class=" tab-pane fade" id="composants" role="tabpanel" aria-labelledby="composants-tab">
  276.                     <ul id="liste_composants" class="list-group">
  277.                         {% for ac in articleComposants %}
  278.                         <!-- Composant 1 -->
  279.                         <li class="list-group-item">
  280.                             {% set slug = dtc_article.getslugifArticle(ac.article) %}
  281.                             <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">
  282.                                 {% set images = dtc_image_article.getImageDefaut(ac.article.id) %}
  283.                                 {% if images[0] is defined %}
  284.                                     {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  285.                                    {# <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%;">#}
  286.                                     <img class="card-img-top" alt="{{ ac.article.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  287.                                 {% else %}
  288.                                     <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  289.                                 {% endif %}
  290.                             </a>
  291.                             <div class="component-text flex-grow-1">
  292.                                 <div class="text-muted">  <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">Réf: {{ ac.article.reference }}</a></div>
  293.                                 <div class="no-transform-text dark">  <a href="{{ path("dtc_article_afficher" , { 'id': ac.article.id,'slug':slug }) }}">{{ ac.article.libelle }}</a></div>
  294.                             </div>
  295.                             <span class="badge badge-info badge-qty">Quantité: {{ ac.quantite }}</span>
  296.                         </li>
  297.                         {% endfor %}
  298.                     </ul>
  299.                 </div>
  300.                 {% endif %}
  301.                 <div class="tab-pane fade" id="applications" role="tabpanel" aria-labelledby="applications-tab">
  302.                     {% if article.universel == 1 %}
  303.                         <div style="padding-bottom:10px;">Produit compatible avec tous les types de véhicules.</div>
  304.                     {% endif %}
  305.                     {% set applications = dtc_article.getApplicationsArticle(article) %}
  306.                     {% if applications|length > 0 %}
  307.                         {% for app in applications %}
  308.                             <div>{{ app.libelle_marque }}</div>
  309.                             {% if app.modeles|length > 0 %}
  310.                                 <ul>
  311.                                     {% for m in app.modeles %}
  312.                                         <li><b>{{ m.libelle_modele }}</b></li>
  313.                                         {% if m.types|length > 0 %}
  314.                                             <ul>
  315.                                                 {% for t in m.types %}
  316.                                                     <li>{{ t.libelle_type }}</li>
  317.                                                 {% endfor  %}
  318.                                             </ul>
  319.                                         {% endif %}
  320.                                     {% endfor %}
  321.                                 </ul>
  322.                             {% endif  %}
  323.                             <div class="both" style="height:10px;"></div>
  324.                         {% endfor %}
  325.                     {% endif %}
  326.                 </div>
  327.                 <div class="tab-pane fade" id="options" role="tabpanel" aria-labelledby="options-tab">
  328.                     {% if articleOptions|length > 0 %}
  329.                     <div class="row">
  330.                         {% for o in articleOptions %}
  331.                             <div class="col-lg-2 col-md-6 mb-4 col-6">
  332.                                 <div class="card-options-fiche-produit h-100 shadow-sm">
  333.                                     {% set slug = dtc_article.getslugifArticle(o.enfant) %}
  334.                                     <a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">
  335.                                     {% set images = dtc_image_article.getImageDefaut(o.enfant.id) %}
  336.                                     {% if images[0] is defined %}
  337.                                         {# <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%;">#}
  338.                                         {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  339.                                         {# <div class="swiper-slide"><img src="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url) | imagine_filter('800x600') }}" alt=""></div>#}
  340.                                         <img class="card-img-top" alt="{{ o.enfant.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  341.                                     {% else %}
  342.                                         <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  343.                                     {% endif %}
  344.                                     </a>
  345.                                     <div class="card-body text-center">
  346.                                         <div class="d-flex align-items-center justify-content-center mb-2">
  347.                                             <span class="product-ref"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">Réf: {{ o.enfant.reference }}</a></span>
  348.                                         </div>
  349.                                         <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>
  350.                                         {% set remise = NULL %}
  351.                                         {% if app.user.id is defined  %}
  352.                                             {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':o.enfant},app.user.client) %}
  353.                                         {% endif %}
  354.                                         {% if remise.remiseId is defined and remise.remiseId > 0 %}
  355.                                             <div style="margin-bottom:10px;">
  356.                                                 <div class="old-price-parent">
  357.                                                     <span class="old-price" style="font-size:1.2em;"><b>{{ o.enfant.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></b></span>
  358.                                                 </div>
  359.                                                 <div style="margin-top:5px;">
  360.                                                     <div class="discount" style="font-size:0.8em;display:inline;">Remise pro -{{ remise.valeur }}%</div>
  361.                                                 </div>
  362.                                                 <div style="margin-top:5px;">
  363.                                                     <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>
  364.                                                     <div class="both"></div>
  365.                                                 </div>
  366.                                             </div>
  367.                                             <div class="both"></div>
  368.                                         {% else %}
  369.                                             <p class="card-text">
  370.                                             {% if app.user.id is defined  %}
  371.                                                 <span class="card-price">{{ o.enfant.prixVente|price|raw }}&nbsp;&euro; HT</span>
  372.                                             {% else %}
  373.                                                 {% set prix_ttc = dtc_article.getPrixVenteTtc(o.enfant) %}
  374.                                                 <span class="card-price">{{ prix_ttc|price|raw }}&nbsp;&euro; TTC</span>
  375.                                             {% endif %}
  376.                                             </p>
  377.                                         {% endif %}
  378.                                         {% if app.user.id is defined %}
  379.                                             <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>
  380.                                         {% else  %}
  381.                                             <a href="/login" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</a>
  382.                                         {% endif %}
  383.                                     </div>
  384.                                 </div>
  385.                             </div>
  386.                         {% endfor %}
  387.                     </div>
  388.                     {% endif %}
  389.                 </div>
  390.                 <div class="tab-pane fade" id="complements" role="tabpanel" aria-labelledby="complements-tab">
  391.                     {% if articleComplements|length > 0 %}
  392.                         <div class="row">
  393.                             {% for o in articleComplements %}
  394.                                 <div class="col-lg-2 col-md-6 mb-4 col-6">
  395.                                     <div class="card-options-fiche-produit h-100 shadow-sm">
  396.                                         {% set slug = dtc_article.getslugifArticle(o.enfant) %}
  397.                                         <a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">
  398.                                             {% set images = dtc_image_article.getImageDefaut(o.enfant.id) %}
  399.                                             {% if images[0] is defined %}
  400.                                                 {% set slugImage = dtc_article.getslugifImage(images[0].id) %}
  401.                                                 <img class="card-img-top" alt="{{ o.enfant.libelle }}" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}/{{ slugImage }}" style="max-width:100%;">
  402.                                             {% else %}
  403.                                                 <img class="card-img-top" src="{{ asset('images/defaut-img-product.jpg') }}" style="max-width:100%;">
  404.                                             {% endif %}
  405.                                         </a>
  406.                                         <div class="card-body text-center">
  407.                                             <div class="d-flex align-items-center justify-content-center mb-2">
  408.                                                 <span class="product-ref"><a href="{{ path("dtc_article_afficher" , { 'id': o.enfant.id,'slug':slug }) }}">Réf: {{ o.enfant.reference }}</a></span>
  409.                                             </div>
  410.                                             <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>
  411.                                             {% set remise = NULL %}
  412.                                             {% if app.user.id is defined  %}
  413.                                                 {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':o.enfant},app.user.client) %}
  414.                                             {% endif %}
  415.                                             {% if remise.remiseId is defined and remise.remiseId > 0 %}
  416.                                                 <div style="margin-bottom:10px;">
  417.                                                     <div>
  418.                                                         <span class="old-price" style="font-size:1.2em;"><b>{{ o.enfant.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></b></span>
  419.                                                     </div>
  420.                                                     <div style="margin-top:5px;">
  421.                                                         <div class="discount" style="font-size:0.8em;display:inline;">Remise pro -{{ remise.valeur }}%</div>
  422.                                                     </div>
  423.                                                     <div style="margin-top:5px;">
  424.                                                         <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>
  425.                                                         <div class="both"></div>
  426.                                                     </div>
  427.                                                 </div>
  428.                                                 <div class="both"></div>
  429.                                             {% else %}
  430.                                                 <p class="card-text">
  431.                                                     {% if app.user.id is defined  %}
  432.                                                         <span class="card-price">{{ o.enfant.prixVente|price|raw }}&nbsp;&euro; HT</span>
  433.                                                     {% else %}
  434.                                                         {% set prix_ttc = dtc_article.getPrixVenteTtc(o.enfant) %}
  435.                                                         <span class="card-price">{{ prix_ttc|price|raw }}&nbsp;&euro; TTC</span>
  436.                                                     {% endif %}
  437.                                                 </p>
  438.                                             {% endif %}
  439.                                             <input id="quantite" name="quantite" type="hidden" class="gauche text-center form-control" style="width:100%;" value="{{ o.multiple}}">
  440.                                             <div class="both"></div>
  441.                                             {% if app.user.id is defined %}
  442.                                                 <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>
  443.                                             {% else  %}
  444.                                                 <a href="/login" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa fa-shopping-cart"></span> Ajouter</a>
  445.                                             {% endif %}
  446.                                         </div>
  447.                                     </div>
  448.                                 </div>
  449.                             {% endfor %}
  450.                         </div>
  451.                     {% endif %}
  452.                 </div>
  453.                 <div class="tab-pane fade" id="notices" role="tabpanel" aria-labelledby="notices-tab">
  454.                     {% if article.documents|length > 0 %}
  455.                         <ul class="list-group list-group-flush liste_notices">
  456.                         {% for im in article.documents  %}
  457.                             <li class="list-group-item d-flex justify-content-between align-items-center file-item">
  458.                                 <div><i class="fa fa-file-pdf-o  fa-file-pdf file-icon mr-2"></i> {{ im.url }}</div>
  459.                                 <a href="{{ asset(im.getUploadDir ~ '/' ~ article.id ~ '/' ~ im.url)  }}" class="btn btn-outline-primary btn-sm" download>
  460.                                     <i class="fa fa-download"></i> Télécharger
  461.                                 </a>
  462.                             </li>
  463.                         {% endfor %}
  464.                     </ul>
  465.                     {% endif %}
  466.                 </div>
  467.                 <div class="tab-pane fade" id="equivalences" role="tabpanel" aria-labelledby="equivalences-tab">
  468.                     <div id="liste_ref_equivalances">
  469.                         <ul class="list-group list-group-flush">
  470.                             {% if article.referenceAppel1  != "" %}
  471.                                 <li class="list-group-item">
  472.                                     <div class="list-left">
  473.                                         <div>
  474.                                             <p class="item-title">{{ article.referenceAppel1 }}</p>
  475.                                            {#  <p class="item-sub">.</p> #}
  476.                                         </div>
  477.                                     </div>
  478.                                 </li>
  479.                             {% endif %}
  480.                             {% if article.referenceAppel2  != "" %}
  481.                                 <li class="list-group-item">
  482.                                     <div class="list-left">
  483.                                         <div>
  484.                                             <p class="item-title">{{ article.referenceAppel2 }}</p>
  485.                                         </div>
  486.                                     </div>
  487.                                 </li>
  488.                             {% endif %}
  489.                             {% if article.referenceAppel3  != "" %}
  490.                                 <li class="list-group-item">
  491.                                     <div class="list-left">
  492.                                         <div>
  493.                                             <p class="item-title">{{ article.referenceAppel3 }}</p>
  494.                                             <p class="item-sub">.</p>
  495.                                         </div>
  496.                                     </div>
  497.                                 </li>
  498.                             {% endif %}
  499.                             {% if article.referenceAppel4  != "" %}
  500.                                 <li class="list-group-item">
  501.                                     <div class="list-left">
  502.                                         <div>
  503.                                             <p class="item-title">{{ article.referenceAppel4 }}</p>
  504.                                             <p class="item-sub">.</p>
  505.                                         </div>
  506.                                     </div>
  507.                                 </li>
  508.                             {% endif %}
  509.                             {% if article.referenceAppel5  != "" %}
  510.                                 <li class="list-group-item">
  511.                                     <div class="list-left">
  512.                                         <div>
  513.                                             <p class="item-title">{{ article.referenceAppel5 }}</p>
  514.                                         </div>
  515.                                     </div>
  516.                                 </li>
  517.                             {% endif %}
  518.                             {% if article.referenceAppel6  != "" %}
  519.                                 <li class="list-group-item">
  520.                                     <div class="list-left">
  521.                                         <div>
  522.                                             <p class="item-title">{{ article.referenceAppel6 }}</p>
  523.                                         </div>
  524.                                     </div>
  525.                                 </li>
  526.                             {% endif %}
  527.                             {% if article.referenceAppel7  != "" %}
  528.                                 <li class="list-group-item">
  529.                                     <div class="list-left">
  530.                                         <div>
  531.                                             <p class="item-title">{{ article.referenceAppel7 }}</p>
  532.                                         </div>
  533.                                     </div>
  534.                                 </li>
  535.                             {% endif %}
  536.                             {% if article.referenceAppel8  != "" %}
  537.                                 <li class="list-group-item">
  538.                                     <div class="list-left">
  539.                                         <div>
  540.                                             <p class="item-title">{{ article.referenceAppel8 }}</p>
  541.                                         </div>
  542.                                     </div>
  543.                                 </li>
  544.                             {% endif %}
  545.                             {% if article.referenceAppel9  != "" %}
  546.                                 <li class="list-group-item">
  547.                                     <div class="list-left">
  548.                                         <div>
  549.                                             <p class="item-title">{{ article.referenceAppel9 }}</p>
  550.                                         </div>
  551.                                     </div>
  552.                                 </li>
  553.                             {% endif %}
  554.                             {% if article.referenceAppel10  != "" %}
  555.                                 <li class="list-group-item">
  556.                                     <div class="list-left">
  557.                                         <div>
  558.                                             <p class="item-title">{{ article.referenceAppel10 }}</p>
  559.                                         </div>
  560.                                     </div>
  561.                                 </li>
  562.                             {% endif %}
  563.                         </ul>
  564.                     </div>
  565.                 </div>
  566.             </div>
  567.         </div>
  568.     </div>
  569.     <!-- /page content -->
  570. {% endblock %}