templates/front/front_shopping/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/layouts_front/base_front.html.twig' %}
  2. {% block stylesheets %}
  3.     {% if isThereSlider|length > 0 %}
  4.         <link rel="stylesheet preload" as="style" media="screen"
  5.               href="{{ asset('js/modern-slide-in/css/sequencejs-theme.modern-slide-in.min.css', 'main-app') }}">
  6.     {% endif %}
  7. {% endblock %}
  8. {% set titleAff = page.seoTitle|default(page.ptitreonglet)|default(page.ptitre) %}
  9. {% set titleAff = "E-boutique" %}
  10. {% if catEnCours is defined %}
  11.     {% for cat in  ecoCategs %}
  12.         {% if cat.id == catEnCours %}
  13.             {% set titleAff = titleAff~" - "~cat.categ_entitled %}
  14.         {% endif %}
  15.     {% endfor %}
  16. {% endif %}
  17. {% set titleAff = titleAff|slice(0,34)~" | "~nomDuSite %}
  18. {% if app.request.locale == 'fr' %}
  19.     {% set metaDescr = page.seoDescription|default( "Retrouvez tous les produits sur le site de "~nomDuSite) %}
  20. {% else %}
  21.     {% set metaDescr = page.seoDescription|default("Find all the products on the "~nomDuSite~" website") %}
  22. {% endif %}
  23. {% block metaDescription %}{{ metaDescr }}{% endblock %}
  24. {% block metaDescriptionOg %}{{ metaDescr }}{% endblock %}
  25. {# {% block keywords %}{{ page.seoKeywords }}{% endblock %} #}
  26. {% block keywords %}{% endblock %}
  27. {% block title %}{{ titleAff }}{% endblock %}
  28. {% block titleOg %}{{ titleAff }}{% endblock %}
  29. {% block content %}
  30.     {% if page is not null %}
  31.         {% set mediaTmp = page.pbandeau %}
  32.         {% set mediaDefault = "default.jpg" %}
  33.         {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  34.         {% set mediaDefault = webp(webpSupported, mediaDefault)|url_encode %}
  35.         <section data-bs-version="5.1" class="header1 cid-sYtfgmlx9v mbr-parallax-background"
  36.                  style="background-image: url('{{ asset("/medias_front/pages/"~mediaTmp|default(mediaDefault))|imagine_filter('front_Bandeau_1920') }}');height: 580px">
  37.             <div class=" mbr-overlay" style="opacity: 0; background-color: rgb(255, 255, 255);"></div>
  38.             <div id="titrePage" class="pt-5 align-center container">
  39.                 <div class="row justify-content-center">
  40.                     <div class="col-12 col-lg-12">
  41.                         {% if category is not empty %}
  42.                             <h1 class="BigTitle mbr-section-title mbr-fonts-style mb-0 display-1">
  43.                                 {{ category.categEntitled }}</h1>
  44.                         {% else %}
  45.                             <h1 class="BigTitle mbr-section-title mbr-fonts-style mb-0 display-1">Boutique</h1>
  46.                         {% endif %}
  47.                     </div>
  48.                 </div>
  49.             </div>
  50.         </section>
  51.     {% else %}
  52.         <section data-bs-version="5.1" class="header1 cid-sYtfgmlx9v mbr-parallax-background"
  53.                  style="background-image: url('{{ asset("/medias_front/pages/default.webp" ) }}');height: 580px">
  54.             <div class=" mbr-overlay" style="opacity: 0; background-color: rgb(255, 255, 255);"></div>
  55.             <div id="titrePage" class="pt-5 align-center container">
  56.                 <div class="row justify-content-center">
  57.                     <div class="col-12 col-lg-12">
  58.                         {% if category is not empty %}
  59.                             <h1 class="BigTitle mbr-section-title mbr-fonts-style mb-0 display-1">
  60.                                 {{ category.categEntitled }}</h1>
  61.                         {% else %}
  62.                             <h1 class="BigTitle mbr-section-title mbr-fonts-style mb-0 display-1">Boutique</h1>
  63.                         {% endif %}
  64.                     </div>
  65.                 </div>
  66.             </div>
  67.         </section>
  68.     {% endif %}
  69.     <div class="blocTitre d-flex justify-content-center flex-wrap">
  70.         {% include '@main-app/front/front_shopping/nav_ariane.html.twig' %}
  71.     </div>
  72.     <div id="page_{{ page.pageId }}" class="container pb-5" style="padding-bottom: 20px !important;">
  73.         {#        {% include 'front/front_shopping/tpl_filters.html.twig' %} #}
  74.         <div class="col-12 pb-4 pt-2 d-flex flex-wrap align-items-center flex-md-row justify-content-center padd">
  75.             {% if categsList is not empty %}
  76.                 <a href="{{ path('front_shopping_categorie') }}" id="allProduct"
  77.                    class="{% if catEnCours == 0 %} selected {% endif %} btnFilterProduct btn btn-light"
  78.                    onclick="toggleHomeProduct(this.id)">Tous les produits</a>
  79.                 {% for categ in categsList %}
  80.                     <a href="{{ path('front_shopping_categorie', {categ_name:categ.categ_entitled|urlrewrite, mark:'marques',categ_id:categ.id }) }}"
  81.                        id="{{ categ.categ_entitled|urlrewrite }}"
  82.                        class="{% if catEnCours == categ.id %} selected {% endif %} btnFilterProduct btn btn-light"
  83.                        onclick="toggleHomeProduct(this.id)">
  84.                         {{ categ.categ_entitled }}</a>
  85.                 {% endfor %}
  86.             {% endif %}
  87.         </div>
  88.         <div class="pb-5 d-flex flex-column flex-wrap align-items-stretch flex-xl-row justify-content-center padd align-content-center overflow-hidden">
  89.             {% for product in products %}
  90.                 <div class="col col-xl-4 containerProduct news p-3 pt-5 m-3{% if loop.index is divisible by(2) %} secondProduct{% endif %}">
  91.                     <div class="containerImage imageProduct">
  92.                         <a href="{{ path('front_shopping_fiche', {product_name:product.prod_model|urlrewrite, prod_id:product.product_id}) }}">
  93.                             <img src="{{ asset('/medias_front/products/' ~ product.prod_picture|default('default.webp') ) | imagine_filter('front_product3') }} "
  94.                                  class="{% if loop.index is divisible by(2) %} secondImage {% endif %}"
  95.                                  alt="{{ product.prod_model }}">
  96.                             <div class="containerLabel containerLabelList">
  97.                                 {% if product.prod_price_type == "promo" %}
  98.                                     <div class="languette">
  99.                                         <img src="{{ websiteroot }}{{ asset('/medias_front/common/languette.png') }}"
  100.                                              alt="promo" class="productPromo">
  101.                                         <span class="languetteTitle">PROMO</span>
  102.                                     </div>
  103.                                 {% elseif product.prod_price_type == 'solde' %}
  104.                                     <div class="languette">
  105.                                         <img src="{{ websiteroot }}{{ asset('/medias_front/common/languetteOrange.png') }}"
  106.                                              alt="solde" class="productPromo">
  107.                                         <span class="languetteTitle">SOLDE</span>
  108.                                     </div>
  109.                                 {% elseif product.prod_novelty == 1 %}
  110.                                     <div class="languetter">
  111.                                         <img src="{{ websiteroot }}{{ asset('/medias_front/common/etiquette-nouveaute.svg') }}"
  112.                                              alt="Nouveauté" class="productPromo new">
  113.                                         <span class="languetteTitle new"></span>
  114.                                     </div>
  115.                                 {% elseif product.prod_soon == 1 %}
  116.                                     <div class="languette ">
  117.                                         <img class="productPromo soon"
  118.                                              src="{{ websiteroot }}{{ asset('/medias_front/common/etiquette-prochainement.svg') }}"
  119.                                              alt="PROCHAINEMENT">
  120.                                         <span class="languetteTitle soon"></span>
  121.                                     </div>
  122.                                 {% elseif product.is_deliverable == 'sur-place' %}
  123.                                     <div class="languette ">
  124.                                         <img class="productPromo soon"
  125.                                              src="{{ websiteroot }}{{ asset('/medias_front/common/etiquette-retrait-sur-place.svg') }}"
  126.                                              alt="PROCHAINEMENT">
  127.                                         <span class="languetteTitle soon"></span>
  128.                                     </div>
  129.                                 {% endif %}
  130.                             </div>
  131.                             {#   {% if product.prod_novelty == 1 %}
  132.                                 <p class="new">Nouveauté</p>
  133.                             {% elseif product.prod_price_type == 'promo' %}
  134.                                 <p class="promo">Promo</p>
  135.                             {% elseif product.prod_price_type == 'solde' %}
  136.                                 <p class="solde">Solde</p>
  137.                             {% endif %} #}
  138.                         </a>
  139.                     </div>
  140.                     <div class="container-text row d-flex align-items-center">
  141.                         <div class="nomProduit">
  142.                             <a href="{{ path('front_shopping_fiche', {product_name:product.prod_model|urlrewrite, prod_id:product.product_id}) }}">
  143.                                 {{ product.prod_model }}
  144.                             </a>
  145.                         </div>
  146.                     </div>
  147.                     <div class="container-text row d-flex align-items-center text-center">
  148.                         {{ product.prod_description|raw }}
  149.                     </div>
  150.                     <div class="row mt-3">
  151.                         {#                        <div class="col-6 flex-wrap justify-content-start"> #}
  152.                         {#                            <span class="producteur"> {{ product.provider }}</span> #}
  153.                         {#                        </div> #}
  154.                         <div class="col-6 flex-wrap justify-content-end">
  155.                             {% set isFavorite = false %}
  156.                             {% for favprod in favsProds %}
  157.                                 {% if favprod.productId == product.product_id and isFavorite == false %}
  158.                                     <a href='javascript:removeToFavorite({{ product.product_id }});'
  159.                                        class="loveProductMultiple"
  160.                                        id="favorite-product-multiple-{{ product.product_id }}">
  161.                                     </a>
  162.                                     {% set isFavorite = true %}
  163.                                 {% endif %}
  164.                             {% endfor %}
  165.                             {% if isFavorite == false %}
  166.                                 <a href='javascript:addToFavorite({{ product.product_id }});'
  167.                                    class="loveProductMultiple"
  168.                                    id="favorite-product-multiple-{{ product.product_id }}">
  169.                                 </a>
  170.                             {% endif %}
  171.                         </div>
  172.                     </div>
  173.                     <hr class="separateBasket">
  174.                     <div class="d-flex align-items-center justify-content-center">
  175.                         <span class="price">
  176.                             {% if product.type_odyssee == "bkdovalue" %}
  177.                                 <label for="bkdoValueAmount-{{ product.ref_id }}">Montant libre</label>
  178.                                 <input name="bkdoValueAmoun-{{ product.ref_id }}t"
  179.                                        id="bkdoValueAmount-{{ product.ref_id }}" type="number" min="1" max="9999"
  180.                                        value="100" class="form-control">
  181.                             {% else %}
  182.                                 {{ product.prod_selling_price|number_format(2, '.', ',') }}€
  183.                                 <input name="bkdoValueAmount-{{ product.ref_id }}"
  184.                                        id="bkdoValueAmount-{{ product.ref_id }}" type="number" min="0" max="0"
  185.                                        value="0" hidden="">
  186.                             {% endif %}
  187.                         </span>
  188.                     </div>
  189.                     <div class="containerImage BasketDown {% if product.prod_soon %}basketDownLeft{% endif %}">
  190.                         {#                        {% if product.type_odyssee == 'soin' %} #}
  191.                         {#                            <a href="{{ path('front_shopping_fiche', {product_name:product.prod_model|urlrewrite, prod_id:product.product_id}) }}" #}
  192.                         {#                               class="plusListeProduct"></a> #}
  193.                         {#                        {% else #}
  194.                         {% if product.prod_soon %}
  195.                             <button class="btn btn-yellow btnIndispo">
  196.                                 Bientôt disponible
  197.                             </button>
  198.                         {% elseif product.ref_quantity > 0 or not stockManagement %}
  199.                             <a href="javascript:addToBasket({{ product.ref_id }}, 1, $('#bkdoValueAmount-{{ product.ref_id }}').val());"
  200.                                class="addToPanelListeProduct"></a>
  201.                         {% else %}
  202.                             <button class="btn btn-yellow btnIndispo">Produit indispo</button>
  203.                         {% endif %}
  204.                     </div>
  205.                 </div>
  206.             {% endfor %}
  207.         </div>
  208.         <div class="d-flex justify-content-center">
  209.             {{ knp_pagination_render(products,'layouts/layouts_front/pagination/paginate.html.twig') }}
  210.         </div>
  211.         {# %///////////////////////////////////% #}{#
  212.         {% set classMargTop = "" %} #}{# plusTopLittle plusTopBig #}{#
  213.         {% set classMargBot = "" %} #}{# plusBotLittle plusBotBig #}{#
  214.         {% set type = 0 %} #}{# plusBotLittle plusBotBig #}{#
  215.         #}{# %///////////////////////////////////% #}{#
  216.         <div id="bloc_listeProducts" class="pageBloc blocGalerie type{{ type }} {{ classMargTop }} {{ classMargBot }}">
  217.             <div class="intPageBloc apparition">
  218.         #}{# {% if bloc.act_bloc_titre or bloc.act_bloc_sstitre %}
  219.                     <div class="blocTitre">
  220.                         {% if bloc.act_bloc_titre %}<h2><span>{{ bloc.act_bloc_titre }}</span></h2>{% endif %}
  221.                         {% if bloc.act_bloc_sstitre %}<h3>{{ bloc.act_bloc_sstitre }}</h3>{% endif %}
  222.                     </div>
  223.                 {% endif %} #}{#
  224.         <div class="blocContenu">
  225.             <div class="intBlocTxtContenu"></div>
  226.             <div class="intBlocContenu flexCenter flexStretch galerie type{{ type }}">
  227.                 {% set cmptRef = 0 %}
  228.                 {% for prod in products %}
  229.                     {% set type = 1 %}
  230.                     {% set mediaTmp = prod.prod_picture %}
  231.                     {% set mediaDefault = "default.jpg" %}
  232.                     {% set mediaTmp = webp(webpSupported, mediaTmp) %}
  233.                     {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  234.                     {% set cmptRef = cmptRef + 1 %}
  235.                     <span class="aSpan flexColumn flexStretch flexNoWrap"
  236.                           style="">
  237.                         <a class="aFigure"
  238.                            href="{{ path('front_shopping_fiche', {product_name:prod.prod_model|urlrewrite, prod_id:prod.prod_id}) }}"
  239.                            title="{{ prod.prod_model }}">
  240.                             {% if prod.prod_soon == 1 %}
  241.                                 <p class="soon">Prochainement</p>
  242.                             {% elseif prod.prod_novelty == 1 %}
  243.                                 <p class="new">Nouveauté</p>
  244.                             {% elseif prod.prod_price_type == 'promo' %}
  245.                                 <p class="promo">Promo</p>
  246.                             {% elseif prod.prod_price_type == 'solde' %}
  247.                                 <p class="solde">Solde</p>
  248.                             {% endif %}
  249.                             <img class="imgZoom lazyload"
  250.                                  data-src="{{ asset('/medias_front/products/'~mediaTmp|default(mediaDefault)) | imagine_filter('front_blocGalerie'~type) }}"
  251.                                  data-srcset="{{ asset('/medias_front/products/'~mediaTmp|default(mediaDefault)) | imagine_filter('front_blocGalerie'~type) }} 250w, {{ asset('/medias_front/products/'~mediaTmp|default(mediaDefault)) | imagine_filter('front_blocGalerie'~type) }} 465w, {{ asset('/medias_front/products/' ~ mediaTmp|default(mediaDefault)) | imagine_filter('front_blocGalerie'~type) }} 1200w"
  252.                                  alt="{{ prod.prod_model }}"/>
  253.                         </a>
  254.                         <div class="contSpan">
  255.                             <span class="infos">
  256.                                 <a href="{{ path('front_shopping_fiche', {product_name:prod.prod_model|urlrewrite, prod_id:prod.prod_id}) }}"
  257.                                    title="{{ prod.prod_model }}">
  258.                                     <span class="nomProd">{{ prod.prod_model }}</span>
  259.                                     <div class="prix flexCenter flexMiddle">
  260.                                         {% if prod.prod_price_type == 'promo' or prod.prod_price_type == 'solde' %}
  261.                                             <span class="prixOrig">{{ prod.prod_selling_price|number_format(2, '.', ',') }} €</span>
  262.                                         {% endif %}
  263.                                         <span class="prixEff ">{{ prod.prod_reference_price|number_format(2, '.', ',') }} €</span>
  264.                                     </div>
  265.                                 </a>
  266.                                 {% if prod.prod_type == 'multiple' %}
  267.                                     <a id="panier-{{ prod.id }}" class="btnPanier aTxtHide  prodMultiple"
  268.                                        href='{{ path('front_shopping_fiche', {product_name:prod.prod_model|urlrewrite, prod_id:prod.prod_id}) }}'>{% trans %}Voir la fiche{% endtrans %}</a>
  269.                                 {% else %}
  270.                                     <a id="panier-{{ prod.id }}" class="btnPanier aTxtHide "
  271.                                        href='javascript:addToBasket({{ prod.ref_id }});'>{% trans %}Ajouter au panier{% endtrans %}</a>
  272.                                 {% endif %}
  273.                             </span>
  274.                         </div>
  275.                     </span>
  276.                 {% else %}
  277.                     <p>Aucun résultat</p>
  278.                 {% endfor %}
  279.                 {{ knp_pagination_render(products) }}
  280.             </div>
  281.         </div>
  282.     </div>
  283.     </div> #}
  284.     </div>
  285.     {#
  286.     <section>
  287.         {% for prod in products %}
  288.             <a href='{{ path('front_shopping_fiche', {product_name:prod.prod_model|urlrewrite, prod_id:prod.id}) }}'>
  289.                 <div>
  290.                     {% if prod.prod_picture is not empty %}
  291.                         <img src="{{ asset('/medias_front/products/' ~ prod.prod_picture) | imagine_filter('admin_default') }}"
  292.                              alt="{{ prod.prod_model }}" />
  293.                     {% endif %}
  294.                     {% if prod.prod_soon == 1 %}
  295.                         <p>Prochainement</p>
  296.                     {% elseif prod.prod_novelty == 1 %}
  297.                         <p>Nouveauté</p>
  298.                     {% elseif prod.prod_price_type == 'promo' %}
  299.                         <p>Promo</p>
  300.                     {% elseif prod.prod_price_type == 'solde' %}
  301.                         <p>Solde</p>
  302.                     {% endif %}
  303.                     <p>{{ prod.prod_model }}</p>
  304.                     <p class="{{ prod.prod_price_type }}">{{ prod.prod_reference_price }}€</p>
  305.                 </div>
  306.             </a>
  307.         {% endfor %}
  308.     </section> #}
  309. {% endblock %}
  310. {% block javascripts %}
  311.     <script rel="preload" as="script" src="{{ asset('js/parallax.js') }}"></script>
  312. {% endblock %}