templates/frontend/category.html.twig line 1

Open in your IDE?
  1. {% extends 'frontend/base.html.twig' %}
  2. {% block JS %}
  3.     <script src="/assets/frontend/js/jquery-3.1.1.min.js"></script>
  4.     <script src="/assets/frontend/js/popper.min.js"
  5.             integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ"
  6.             crossorigin="anonymous"></script>
  7.     <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"
  8.             integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm"
  9.             crossorigin="anonymous"></script>
  10.     <script type="text/javascript" src="/assets/frontend/js/owl.carousel.min.js"></script>
  11.     <script type="text/javascript" src="/assets/frontend/js/slick.min.js"></script>
  12.     <script type="text/javascript" src="/assets/frontend/js/jquery.mmenu.js"></script>
  13.     <script src="https://unpkg.com/infinite-scroll@3/dist/infinite-scroll.pkgd.min.js"></script>
  14.     <script type="text/javascript">
  15.         
  16.                 $(function() {
  17.             $('#menu').mmenu();
  18.               
  19.               let infScroll =  $('.endless_container').infiniteScroll({
  20.                 path: '.page-next',
  21.                 append: '.endless_page',
  22.                 history: false,
  23.                 });
  24.                 
  25. let t;
  26.                 $('.endless_container').on( 'request.infiniteScroll', function( event, path, fetchPromise ) {
  27.                 console.log(`Loading page: ${path}`);
  28.                 $('#product-loader').show();
  29.                  t = setTimeout(function () {
  30.                     $('#product-loader').hide();
  31.                     console.log('load');
  32.                     $('#paginatorDefaultPage').removeClass('d-none');
  33.                 }, 4000);
  34.                 t;
  35.                 });
  36.                  
  37.                 $('.endless_container').on( 'append.infiniteScroll', function( event, body, path, items, response ) {
  38.                 console.log(`Appended ${items.length} items on ${path}`);
  39.                 $('#product-loader').hide();
  40.                  clearTimeout(t);
  41.                 });
  42.                   
  43.         });
  44.         
  45.     </script>
  46.     <script>
  47.         $('input[class=filterItemsProduct]').on('change', function() {
  48.             var getValueinput = $(this).val();
  49.             var newUrlParam = '?filter='+getValueinput;
  50.             return window.location =  newUrlParam;
  51.         });
  52.     </script>
  53. {#
  54.     {% if global.displayStarterKits %}
  55.         <script src="/assets/shared/plugins/slick-modal-css3-powered-popups/src/demos/js/carousel_slider.js"></script>
  56.         <script src="/assets/shared/plugins/slick-modal-css3-powered-popups/src/plugin/js/jquery.slickmodal.min.js"></script>
  57.         <script type="text/javascript">
  58.             $(function() {
  59.                 $('.carouselSlider').SlickModals({
  60.                     restrict_cookieDays: '1',
  61.                     restrict_showAfterVisits: 1,
  62.                     restrict_showAfterVisitsResetWhenShown: false,
  63.                     popup_type: 'exit',
  64.                     popup_animation: 'zoomIn',
  65.                     popup_css: {
  66.                         'width': '480px',
  67.                         'height': {% if global.starterKits | length > 2 %}'480px'{% else %}'400px'{% endif %},
  68.                         'background': '#fff',
  69.                         'padding': '40px',
  70.                         'margin': '0'
  71.                     },
  72.                     overlay_css: {
  73.                         'background': 'rgba(0,0,0,0.3)'
  74.                     },
  75.                     mobile_breakpoint: '480px',
  76.                     mobile_position: 'center',
  77.                     mobile_css: {
  78.                         'width': '100%',
  79.                         'height': {% if global.starterKits | length > 2 %}'480px'{% else %}'400px'{% endif %},
  80.                         'background': '#fff',
  81.                         'padding': '30px',
  82.                         'margin': '0'
  83.                     },
  84.                     callback_afterVisible: function () {
  85.                         sm_carouselSlider('.carouselSlider');
  86.                     }
  87.                 });
  88.             });
  89.         </script>
  90.     {% endif %}
  91. #}
  92.     <script src="/assets/frontend/js/874ad7ad81.js"></script>
  93.     <script type="text/javascript" src="/assets/frontend/js/main.js?ver=1.1"></script>
  94.     <script type="text/javascript" src="/assets/frontend/js/registration.js"></script>
  95.     <script type="text/javascript" src="/assets/frontend/js/category-filter.js"></script>
  96.     <script type="text/javascript" src="/assets/frontend/js/scroll-down.js"></script>
  97.     <script type="text/javascript" src="/assets/frontend/js/show-more.js"></script>
  98.     <script type="text/javascript" src="/assets/frontend/js/region-currency-lang-select.js"></script>
  99.     <script type="text/javascript" src="/assets/frontend/js/custom-select.js"></script>
  100.     <script src="{{ asset('build/frontend/category.js') }}"></script>
  101. {% endblock %}
  102. {% block CSS %}
  103.     <link rel="stylesheet" href="/assets/frontend/css/owl.carousel.min.css">
  104.     <link href="/assets/frontend/css/responsive.css?ver={{global.cssVersion}}" rel="stylesheet" type="text/css" media="all">
  105.     <link href="/assets/frontend/css/jquery.mmenu.css" rel="stylesheet" type="text/css" media="all">
  106.     <link href="/assets/frontend/css/styles.css?ver={{global.cssVersion}}" rel="stylesheet" type="text/css" media="all">
  107.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
  108.                            integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
  109.     <!-- Add the slick-theme.css if you want default styling -->
  110.     <link rel="stylesheet" type="text/css" href="/assets/frontend/css/slick.css"/>
  111.     <!-- Add the slick-theme.css if you want default styling -->
  112.     <link rel="stylesheet" type="text/css" href="/assets/frontend/css/slick-theme.css"/>
  113.     <script src="{{ asset('build/frontend/category.css') }}"></script>
  114. {% endblock %}
  115. {% block title %}{% if category.name is not empty %}{{category.name}},{% endif %} {{category.title}}{% endblock %}
  116.     {% block metaDescription %}{% if category.metaDescription %}{{category.metaDescription}}{%else%}{{category.description | slice(0, 160) | raw}}{%endif%}{% endblock %}
  117. {% block content %}
  118.     <!--Category section-->
  119.     <div class="category row mb-rem">
  120.         <!--Category section header-->
  121.         <section class="category-header">
  122.             {% if category.banner or forcedBanner is defined %}
  123.                 <div class="category-header-top">
  124.                     {% if forcedBanner is defined %}
  125.                         <img class="category-header-top-img full-width" src="{{forcedBanner}}">
  126.                     {% else %}
  127.                         <img class="category-header-top-img full-width" src="{{path('getImageAsCroppedThumb',{'id': category.banner.id, 'height': '250', 'width' : '1900'})}} ">
  128.                     {% endif %}
  129.                     <h5 class="category-header-top-caption "><span>{{category.title}}</span></h5>
  130.                 </div>
  131.             {% endif %}
  132.             {% if category.description %}
  133.                 <div class="category-header-description text-left d-none d-xl-block  d-lg-block d-md-block">
  134.                     <p class="category-header-description-text text-overflow">
  135.                     {{category.description | raw}}
  136.                     </p>
  137.                     {#
  138.                     {% if category.description |length > 200 %}
  139.                         <a class="category-header-description-more btn-overflow"> + Plus</a>
  140.                     {% endif %}
  141.                     #}
  142.                 </div>
  143.             {% endif %}
  144.         </section>
  145.         <!--Category section header-->
  146.         <section class="category-products m-t-10">
  147.             <div class="row justify-content-end category-search">
  148.                 <div class="col-xl-6 col-lg-12 col-md-12 col-12 align-self-end">
  149.                     <div class="row justify-content-between">
  150.                         {#
  151.                         <div class="col-xl-6 col-lg-6 col-md-6 m-b-10">
  152.                             <div class="row no-gutters">
  153.                                 <div class="col text-right">
  154.                                     <input class="border-right-0 rounded-0 search-input category-search-product"
  155.                                            type="search" placeholder="Chercher des produits...">
  156.                                 </div>
  157.                                 <div class="col-auto">
  158.                                     <button class="category-search-product-btn border-left-0 rounded-0 rounded-right search-btn"
  159.                                             type="button">
  160.                                         <i class="fa fa-search" aria-hidden="true"></i>
  161.                                     </button>
  162.                                 </div>
  163.                             </div>
  164.                         </div>
  165.                         <div class="select-label category-search__text col-xl-2 col-lg-1 col-md-1 d-none d-xl-block  d-lg-block">
  166.                             <span>Trier par:</span>
  167.                         </div>
  168.                         <div class="column-select col-xl-4 col-lg-5 col-md-6 col-5 d-none d-md-block">
  169.                             <div class="select-wrapper">
  170.                                 <select name="order" class="form-control form-control-lg"
  171.                                                      id="orderSelect">
  172.                                     <option value="plus">plus pertinents
  173.                                     </option>
  174.                                     <option value="nouveaux">nouveaux produits
  175.                                     </option>
  176.                                     <option value="bas">prix le plus bas
  177.                                     </option>
  178.                                     <option value="haut" selected>prix le plus haut</option>
  179.                                     <option value="mieux">mieux cotes
  180.                                     </option>
  181.                                     <option value="promotions">promotions
  182.                                     </option>
  183.                                 </select>
  184.                             </div>
  185.                         </div>
  186.                         #}
  187.                         <div class="column-select select-category col-4 d-block d-md-none">
  188.                             <button type="button" class="button category-products-filters-btn"
  189.                                                   id="mobileFilterModal">
  190.                                 <span>
  191.                                     <img src="/assets/frontend/images/icons/filter-icon.svg" alt="">
  192.                                 </span>
  193.                                 <span class="text-button-filters" style="margin-right: 0px;">
  194.                                     Filtres
  195.                                 </span>
  196.                             </button>
  197.                         </div>
  198.                         {#
  199.                         <div class="column-select select-trier col-4 d-block d-md-none">
  200.                             <!--<div class="select-wrapper">-->
  201.                             <div class="dropdown" aria-haspopup="true" aria-expanded="false">
  202.                                 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Trier<span class="caret"></span></a>
  203.                                 <ul class="dropdown-menu select-options pull-bottom">
  204.                                     <li><a data-value="Tout">Tout </a></li>
  205.                                     <li><a data-value="Category A">plus pertinents</a></li>
  206.                                     <li><a data-value="Category B">nouveaux produits</a></li>
  207.                                     <li><a data-value="Category B">prix le plus bas</a></li>
  208.                                     <li><a data-value="Category C">prix le plus haut</a></li>
  209.                                     <li><a data-value="Category D">mieux cotes</a></li>
  210.                                     <li><a data-value="Category E">promotions</a></li>
  211.                                 </ul>
  212.                             </div>
  213.                             <!--</div>-->
  214.                         </div>
  215.                         #}
  216.                     </div>
  217.                 </div>
  218.                 <!--<div class="d-none d-xl-block  d-lg-block d-md-block col-xl-3 col-lg-3 col-md-3 col-3"></div>-->
  219.                 <!--<div class="d-none d-xl-block  d-lg-block d-md-block col-xl-3 col-lg-3 col-md-3 col-3"></div>-->
  220.             </div>
  221. {% block section_category_stats %}
  222.             <!--Category section filters-->
  223.             <!--<div class="row d-none d-xl-block  d-lg-block d-md-block">-->
  224.             <div class="row">
  225.                 <div class="col-12 text-right" id="checked-filters">
  226.                   <div class="category-products-result d-none d-xl-block d-lg-block d-md-block">
  227.                     {% if sorting is defined %}
  228.                       {% set sort_popularity_order = "desc" %}
  229.                       {% set sort_date_order = "desc" %}
  230.                       {% set sort_price_order = "desc" %}
  231.                       {% if sorting == "popularity" %}
  232.                         {% if order == "asc" %}
  233.                           {% set sort_popularity_order = "desc" %}
  234.                         {% else %}
  235.                           {% set sort_popularity_order = "asc" %}
  236.                         {% endif %}
  237.                       {% elseif sorting == "date" %}
  238.                         {% if order == "asc" %}
  239.                           {% set sort_date_order = "desc" %}
  240.                         {% else %}
  241.                           {% set sort_date_order = "asc" %}
  242.                         {% endif %}
  243.                       {% elseif sorting == "price" %}
  244.                         {% if order == "asc" %}
  245.                           {% set sort_price_order = "desc" %}
  246.                         {% else %}
  247.                           {% set sort_price_order = "asc" %}
  248.                         {% endif %}
  249.                       {% endif %}
  250.                         {% if app.request.attributes.get('_route') == 'viewCategory' or app.request.attributes.get('_route') == 'viewOnSalesProduct' %}
  251.                             <a href="{{link}}"  style="{% if sorting == null %}text-decoration: underline !important;{% endif %}">Défaut</a> |
  252.                         {% endif %}
  253.                       <a href="?sorting=popularity&order={{sort_popularity_order}}" style="{% if sorting == "popularity" %}text-decoration: underline !important;{% endif %}">Popularité {% if sort_popularity_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a> |
  254.                       <a href="?sorting=price&order={{sort_price_order}}" style="{% if sorting == "price" %}text-decoration: underline !important;{% endif %}">Prix {% if sort_price_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a> |
  255.                       <a href="?sorting=date&order={{sort_date_order}}" style="{% if sorting == "date" %}text-decoration: underline !important;{% endif %}">Récent {% if sort_date_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a>
  256.                     {% endif %}
  257.                     <br> RÉSULTATS: <span id="amountProducts">{{productsAmount}}</span> PRODUITS
  258.                   </div>
  259.                 </div>
  260.             </div>
  261.             <!--Category section filters-->
  262. {% endblock %}
  263.             <!--Category section products-->
  264.             <div class="row">
  265.                 <div class="d-none category-products-filters-wrap d-xl-block  d-lg-block d-md-block col-xl-2 col-lg-2 col-md-3 pull-left">
  266.                     <div class="category-products-filters not-mobile">
  267.                         {% block category_filter %}
  268.                         {% if selected.main is defined and selected.main is not empty %}
  269.                         <a class="hide-mobile category-products-filters-title" id="filter-show-all" href="/categorie">
  270.                           <span style="color:black;font-weight:bold;"><i
  271.                           class="fa fa-angle-left" aria-hidden="true"></i></span>
  272.                         TOUT</a>
  273.                         {% endif %}
  274.                         <div class="category-product-filter first hide-mobile">
  275.                             {% for category in global.menu if global.hasProducts(category) %}
  276.                               {% if ( selected.main is defined and selected.main == category.id ) or ( selected is defined and selected.main is empty ) or ( selected is not defined ) %}
  277.                               <div class="category-product-filter-hierarchy">
  278.                                   {# <span class="category-product-filter-hierarchy-back-btn"><i
  279.                                         class="fa fa-angle-left" aria-hidden="true"></i></span> #}
  280.                                   <a data-id="{{category.id}}" data-type="category" class="category-product-filter-hierarchy-title filterItemsProduct {% if selected.main is defined and selected.main == category.id %} active selected {% endif %}" id="cat_{{category.id}}" data-url="{{category.getFullUrlPath}}" href="/categorie{{category.getFullUrlPath}}">{{category.name | upper }}</a>
  281.                                   {% if selected.main is defined and selected.main == category.id %}
  282.                                     {% for subCategory in category.categories %}
  283.                                       <div class="category-product-filter-hierarchy-l2">
  284.                                         {% if selected.sub1 is defined and selected.sub1== subCategory.id %}
  285.                                         <span class="category-product-filter-hierarchy-back-btn"><i
  286.                                         class="fa fa-angle-left" aria-hidden="true"></i></span>
  287.                                         {% endif %}
  288.                                         <div class="underline-effect-wrapper categorie-left-menu">
  289.                                         {% if subCategory.placement > 0 %}
  290.                                           <a id="cat_{{subCategory.id}}" data-id="{{subCategory.id}}" data-type="category" class="category-product-filter-hierarchy-title underline-effect underline-effect-black underline-effect-h1 filterItemsProduct {% if selected.sub1 is defined and selected.sub1== subCategory.id %} active selected {% endif %}" data-url="{{subCategory.getFullUrlPath}}" href="/categorie{{subCategory.getFullUrlPath}}">
  291.                                                {{subCategory.name}} <i>({{ global.getCountProduct(subCategory) }})</i>
  292.                                               
  293.                                               {% endif %}
  294.                                           </a>
  295.                                           <ul class="">
  296.                                     {% for subCat in subCategory.categories if global.hasProducts(subCat) %}
  297.                                          {% if subCat.placement > 0 %}
  298.                                                 <li>
  299.                                                     <a id="cat_{{subCat.id}}" data-id="{{subCat.id}}" data-type="category" class="underlineSubcategory" data-url="{{subCat.getFullUrlPath}}" href="/categorie{{subCat.getFullUrlPath}}">
  300.                                                         {{subCat.name}} <i>({{ global.getCountProduct(subCat) }})</i>
  301.                                                     </a>
  302.                                                 </li>
  303.                                                 {% endif %}
  304.                                           {% endfor %}
  305.                                           </ul>
  306.                                         </div>
  307.                                       </div>
  308.                                     {% endfor %}
  309.                                   {% endif %}
  310.                               </div>
  311.                               {% endif %}
  312.                             {% endfor %}
  313.                         </div>
  314.                         <div class="category-divider hide-mobile"></div>
  315.                         <div class="category-product-filter">
  316.                           <div class="d-md-none d-sm-block text-center">
  317.                             {% if sorting is defined %}
  318.                       {% set sort_popularity_order = "desc" %}
  319.                       {% set sort_date_order = "desc" %}
  320.                       {% set sort_price_order = "desc" %}
  321.                       {% if sorting == "popularity" %}
  322.                         {% if order == "asc" %}
  323.                           {% set sort_popularity_order = "desc" %}
  324.                         {% else %}
  325.                           {% set sort_popularity_order = "asc" %}
  326.                         {% endif %}
  327.                       {% elseif sorting == "date" %}
  328.                         {% if order == "asc" %}
  329.                           {% set sort_date_order = "desc" %}
  330.                         {% else %}
  331.                           {% set sort_date_order = "asc" %}
  332.                         {% endif %}
  333.                       {% elseif sorting == "price" %}
  334.                         {% if order == "asc" %}
  335.                           {% set sort_price_order = "desc" %}
  336.                         {% else %}
  337.                           {% set sort_price_order = "asc" %}
  338.                         {% endif %}
  339.                       {% endif %}
  340.                         {% if app.request.attributes.get('_route') == 'viewCategory' %}
  341.                             <a href="{{link}}"  style="{% if sorting == null %}text-decoration: underline !important;{% endif %}">Défaut</a> |
  342.                         {% endif %}
  343.                       <a href="?sorting=popularity&order={{sort_popularity_order}}" style="{% if sorting == "popularity" %}text-decoration: underline !important;{% endif %}">Popularité {% if sort_popularity_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a> |
  344.                       <a href="?sorting=price&order={{sort_price_order}}" style="{% if sorting == "price" %}text-decoration: underline !important;{% endif %}">Prix {% if sort_price_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a> |
  345.                       <a href="?sorting=date&order={{sort_date_order}}" style="{% if sorting == "date" %}text-decoration: underline !important;{% endif %}">Récent {% if sort_date_order == "asc" %}&#8673;{% else %}&#8675;{% endif %}</a>
  346.                     {% endif %}
  347.                         </div>
  348.                             <div class="category-product-filter-title" onclick="panelUnClick()" ><i class="flecheUn ti-angle-right" style="margin-right: 10px;"></i><span style="display: inline;">LIVRAISON</span></div>
  349.                             <div class="category-product-filter-checkbox" id="panelUn" style="display:none;">
  350.                                 <div>
  351.                                     <label class="checkbox">
  352.                                         <input id="shipping_maturin" type="checkbox" value="LivraisonMaturin" class="filterItemsProduct" data-id="0" data-type="shipping" {% if filters.shipping is defined and '0' in filters.shipping %}checked{% endif %}>
  353.                                         <i></i>Maturin <img style="display: inline-block; margin-right: 15px;" src="/images/maturinshipping.png" alt="Livraison par Maturin" title="Livraison par Maturin">
  354.                                     </label>
  355.                                 </div>
  356.                                 <div>
  357.                                     <label class="checkbox">
  358.                                         <input id="shipping_producer" type="checkbox" value="LivraisonIndependante" class="filterItemsProduct" data-id="1" data-type="shipping" {% if filters.shipping is defined and  '1' in filters.shipping %}checked{% endif %}>
  359.                                         <i></i>Indépendante
  360.                                     </label>
  361.                                 </div>
  362.                             </div>
  363.                         </div>
  364.                         <div class="category-product-filter">
  365.                             <div class="category-product-filter-title"  onclick="panelDeuxClick()"><i class="flecheDeux ti-angle-right" style="margin-right: 10px;"></i><span style="display: inline;">PRIX</span></div>
  366.                             <div class="category-product-filter-checkbox" id="panelDeux" style="display:none;">
  367.                                 <div>
  368.                                     <label class="checkbox" style="color:#f0632f;">
  369.                                         <input id="price_sale" type="checkbox" name="checkbox" value="EnSolde" class="filterItemsProduct" data-id="0" data-type="price" {% if filters.price is defined and '0' in filters.price %}checked{% endif %}>
  370.                                         <i></i><strong>En Solde</strong>
  371.                                     </label>
  372.                                 </div>
  373.                                 <div>
  374.                                     <label class="checkbox">
  375.                                         <input id="price_10" type="checkbox" name="checkbox" value="Moins10" class="filterItemsProduct" data-id="10" data-type="price" {% if filters.price is defined and '10' in filters.price %}checked{% endif %}>
  376.                                         <i></i>Moins de 10$
  377.                                     </label>
  378.                                 </div>
  379.                                 <div>
  380.                                     <label class="checkbox">
  381.                                         <input id="price_1025" type="checkbox" name="checkbox" value="price10-25" class="filterItemsProduct" data-id="10-25" data-type="price" {% if filters.price is defined and '10-25' in filters.price %}checked{% endif %}>
  382.                                         <i></i>10$-25$
  383.                                     </label>
  384.                                 </div>
  385.                                 <div>
  386.                                     <label class="checkbox">
  387.                                         <input id="price_2050" type="checkbox" name="checkbox" value="price25-50" class="filterItemsProduct" data-id="25-50" data-type="price" {% if filters.price is defined and '25-50' in filters.price %}checked{% endif %}>
  388.                                         <i></i>25$-50$
  389.                                     </label>
  390.                                 </div>
  391.                                 <div>
  392.                                     <label class="checkbox">
  393.                                         <input id="price_50" type="checkbox" name="checkbox" value="Plus50" class="filterItemsProduct" data-id="50" data-type="price" {% if filters.price is defined and '50' in filters.price %}checked{% endif %}>
  394.                                         <i></i>Plus de 50$
  395.                                     </label>
  396.                                 </div>
  397.                             </div>
  398.                         </div>
  399.                         <div class="category-product-filter">
  400.                             <div class="category-product-filter-title" onclick="panelTroisClick()"><i class="flecheTrois ti-angle-right" style="margin-right: 10px;"></i><span style="display: inline;">CONSERVATION</span></div>
  401.                             <div class="category-product-filter-checkbox" id="panelTrois" style="display:none;">
  402.                                 {% for conservation in conservations %}
  403.                                     <div>
  404.                                         <label class="checkbox">
  405.                                             <input id="conservation_{{conservation.id}}" type="checkbox" name="checkbox" value="{{conservation.name}}" data-id="{{conservation.id}}" data-type="conservation" class="filterItemsProduct">
  406.                                             <i></i>{{conservation.name}}
  407.                                         </label>
  408.                                     </div>
  409.                                 {% endfor %}
  410.                             </div>
  411.                         </div>
  412.                         <div class="category-product-filter">
  413.                             <div class="category-product-filter-title" onclick="panelQuatreClick()"><i class="flecheQuatre ti-angle-right" style="margin-right: 10px;"></i><span style="display: inline;">CERTIFICATION</span></div>
  414.                             <div class="category-product-filter-checkbox" id="panelQuatre" style="display:none;">
  415.                                     <div>
  416.                                         <label class="checkbox">
  417.                                             <input id="aliment_du_quebec" type="checkbox" name="checkbox" value="AlimentsQuebec" data-id="true" data-type="aliment_quebec" class="filterItemsProduct">
  418.                                             <i></i>Aliments du Québec
  419.                                         </label>
  420.                                     </div>
  421.                                     <div>
  422.                                         <label class="checkbox">
  423.                                             <input id="is_prix_laureat" type="checkbox" name="checkbox" value="PrixLaureat" data-id="true" data-type="prix_laureat" class="filterItemsProduct">
  424.                                             <i></i>Prix Laureat
  425.                                         </label>
  426.                                     </div>
  427.                                     <div>
  428.                                         <label class="checkbox">
  429.                                             <input id="is_produit_biologique" type="checkbox" name="checkbox" value="Biologique" data-id="true" data-type="produit_biologique" class="filterItemsProduct">
  430.                                             <i></i>Porduit Bio
  431.                                         </label>
  432.                                     </div>
  433.                                      <div>
  434.                                         <label class="checkbox">
  435.                                             <input id="SansGluten" type="checkbox" name="checkbox" value="Sans_Gluten" data-type="certification" class="filterItemsProduct">
  436.                                             <i></i>Sans Gluten
  437.                                         </label>
  438.                                     </div>
  439.                                      <div>
  440.                                         <label class="checkbox">
  441.                                             <input id="Vegane" type="checkbox" name="checkbox" value="Vegane" data-type="certification" class="filterItemsProduct">
  442.                                             <i></i>Végane
  443.                                         </label>
  444.                                     </div>
  445.                                      <div>
  446.                                         <label class="checkbox">
  447.                                             <input id="Paleo" type="checkbox" name="checkbox" value="Paleo" data-type="certification" class="filterItemsProduct">
  448.                                             <i></i>Paléo
  449.                                         </label>
  450.                                     </div>
  451.                                     <div>
  452.                                         <label class="checkbox">
  453.                                             <input id="SansLactose" type="checkbox" name="checkbox" value="Sans_Lactose" data-type="certification" class="filterItemsProduct">
  454.                                             <i></i>Sans Lactose
  455.                                         </label>
  456.                                     </div>
  457.                                     <div>
  458.                                         <label class="checkbox">
  459.                                             <input id="SansNoix" type="checkbox" name="checkbox" value="Sans_Noix" data-type="certification" class="filterItemsProduct">
  460.                                             <i></i>Sans noix
  461.                                         </label>
  462.                                     </div>
  463.                                     </div>
  464.                         </div>
  465.                         <div class="category-product-filter">
  466.                             <div class="category-product-filter-title" onclick="panelCinqClick()"><i class="flecheCinq ti-angle-right" style="margin-right: 10px;"></i><span style="display: inline;">RÉGION</span></div>
  467.                             <div class="category-product-filter-checkbox" id="panelCinq" style="display:none;">
  468.                                 {% for region in regions %}
  469.                                     {% if region.name != "defaut" %}
  470.                                         <div>
  471.                                             <label class="checkbox">
  472.                                                 <input id="region_{{region.id}}" type="checkbox" name="checkbox" value="region_{{region.name}}" data-id="{{region.id}}" class="filterItemsProduct" data-type="region">
  473.                                                     <i></i>{{region.name}}
  474.                                             </label>
  475.                                         </div>
  476.                                     {% endif %}
  477.                                 {% endfor %}
  478.                             </div>
  479.                         </div>
  480.                         {% endblock %}
  481.                     </div>
  482.                 </div>
  483.                 <div class="col-xl-10 col-lg-10 col-md-9 col-sm-12 col-12 products-wrap" id="listingProducts">
  484.                     {% block section_masonry_products %}
  485.                         <div class="endless_container" id="endless_container">
  486.                             <article  class="endless_page" style="">
  487.                                 {{ include ('frontend/productMasonry.html.twig', {'masonryProducts': products} ) }}
  488.                             </article>
  489.                         </div>
  490.                         <div class="" id="product-loader" style="display: none; width: 100%; height: 100px; position: relative !important; background: url(/images/loading.gif)    center no-repeat #fff;"></div>
  491.                         <script>
  492.                             var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
  493.                             if(supportsTouch){
  494.                                 var elems = document.querySelectorAll(".button-touch");
  495.                                 [].forEach.call(elems, function(el) {
  496.                                     el.classList.remove("d-none");
  497.                                 });
  498.                             }
  499.                         </script>
  500.                         {# {{ dump(app.request.attributes.get('_route'))}} #}
  501.                         {% if app.request.attributes.get('_route') == 'viewCategory' %}
  502.                         {% if products.getPaginationData.current == products.getPaginationData.last %}
  503.                                 <div id="paginatorDefaultLast" class="infinite-scroll-last">{{ knp_pagination_render(products) }}</div>
  504.                         {% endif %}
  505.                         {% endif %}
  506.                     {% endblock %}
  507.                     {% if suggestionProducts is defined %}
  508.                       {% if suggestionProducts %}
  509.                         <div class="section-title section-title-line m-t-10">Des produits à découvrir!</div>
  510.                         {{ include ('frontend/productMasonry.html.twig', {'masonryProducts': suggestionProducts} ) }}
  511.                       {% endif %}
  512.                     {% endif %}
  513.                     </div>
  514.                 </div>
  515.             <!--Category section products-->
  516.         </section>
  517.             </div>
  518.             <script>
  519.                 function panelUnClick() {
  520.                  var x = document.getElementById("panelUn");
  521.                     if (x.style.display === "none") {
  522.                         x.style.display = "block";
  523.                         $( ".flecheUn" ).removeClass( "ti-angle-right" ).addClass( "ti-angle-down" );
  524.                     } else {
  525.                         x.style.display = "none";
  526.                         $( ".flecheUn" ).removeClass( "ti-angle-down" ).addClass( "ti-angle-right" );
  527.                     }
  528.                 }
  529.             </script>
  530.              <script>
  531.                 function panelDeuxClick() {
  532.                  var x = document.getElementById("panelDeux");
  533.                      if (x.style.display === "none") {
  534.                         x.style.display = "block";
  535.                         $( ".flecheDeux" ).removeClass( "ti-angle-right" ).addClass( "ti-angle-down" );
  536.                     } else {
  537.                         x.style.display = "none";
  538.                         $( ".flecheDeux" ).removeClass( "ti-angle-down" ).addClass( "ti-angle-right" );
  539.                     }
  540.                 }
  541.             </script>
  542.              <script>
  543.                 function panelTroisClick() {
  544.                  var x = document.getElementById("panelTrois");
  545.                      if (x.style.display === "none") {
  546.                         x.style.display = "block";
  547.                         $( ".flecheTrois" ).removeClass( "ti-angle-right" ).addClass( "ti-angle-down" );
  548.                     } else {
  549.                         x.style.display = "none";
  550.                         $( ".flecheTrois" ).removeClass( "ti-angle-down" ).addClass( "ti-angle-right" );
  551.                     }
  552.                 }
  553.             </script>
  554.              <script>
  555.                  function panelQuatreClick() {
  556.                  var x = document.getElementById("panelQuatre");
  557.                       if (x.style.display === "none") {
  558.                         x.style.display = "block";
  559.                         $( ".flecheQuatre" ).removeClass( "ti-angle-right" ).addClass( "ti-angle-down" );
  560.                     } else {
  561.                         x.style.display = "none";
  562.                         $( ".flecheQuatre" ).removeClass( "ti-angle-down" ).addClass( "ti-angle-right" );
  563.                     }
  564.                 }
  565.             </script>
  566.              <script>
  567.                   function panelCinqClick() {
  568.                  var x = document.getElementById("panelCinq");
  569.                      if (x.style.display === "none") {
  570.                         x.style.display = "block";
  571.                         $( ".flecheCinq" ).removeClass( "ti-angle-right" ).addClass( "ti-angle-down" );
  572.                     } else {
  573.                         x.style.display = "none";
  574.                         $( ".flecheCinq" ).removeClass( "ti-angle-down" ).addClass( "ti-angle-right" );
  575.                     }
  576.                 }
  577.             </script>
  578.             <script>
  579.             </script>
  580. {% endblock %}