templates/includes/header_b2c.html.twig line 204

Open in your IDE?
  1. {% block content %}
  2. {% set totalAmount = ((totalAmount is defined) and totalAmount)%}
  3. {% set categories = app_category_get_data() %}
  4. {% set params = app_get_params() %}
  5. {% set userType = (app.user)?app.user.UserType:'' %}
  6. {% set role = (app.user)?app.user.UserRoles:'' %}
  7. {% set wesbiteName = document.getProperty('website_name') %}
  8. {% set mecstore_lang = app.request.locale %}
  9. {% if mecstore_lang == 'en'%}
  10.     {% set prefix_language = '/en/' %}
  11. {% else %}
  12.     {% set prefix_language = '/' %}
  13. {% endif %}
  14.     <script>
  15.         window.portoTexts = {
  16.             addedToCart: "{{ 'added_to_cart'|trans }}",
  17.             viewCart: "{{ 'view_cart'|trans }}",
  18.             linkCart: "{{ 'link_cart'|trans }}",
  19.             linkCheckout: "{{ 'link_checkout'|trans }}",
  20.         };
  21.     </script>
  22.     <style>
  23.         .sidebar-shop .widget.prezzo {
  24.             display:none!important;
  25.         }
  26.     </style>
  27. <header class="header box-shadow">
  28.    
  29.             <div class="header-middle sticky-header" data-sticky-options="{'mobile': true}">
  30.                 <div class="container">
  31.                     <div class="header-left">
  32.                         <button class="mobile-menu-toggler" type="button">
  33.                             <i class="fas fa-bars fa-2x"></i>
  34.                             <!-- <img src="/mecstore/b2c/assets/images/custom/logo.png" alt="Porto Logo" width="111" height="44"> -->
  35.                         </button>
  36.                         
  37.                         <a href="{{ prefix_language }}" class="logo">
  38.                         {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  39.                             <img src="/mecstore/b2c/assets/images/custom/logo.png" alt="Mecstore" class="d-block" width="262" height="auto" >
  40.                         {% else %}
  41.                             <img src="/mecstore/b2c/assets/images/custom/logo.png" alt="Mecstore" class="d-block" width="262" height="auto" >
  42.                         {% endif %}
  43.                             {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  44.                             <a href="{{ path('b2c-account-index') }}" class="d-block d-lg-none text-dark">
  45.                                 {{ 'Benvenuto'|trans }} {# <strong>{{app.user.firstname}} {{app.user.lastname}}</strong> #}
  46.                             </a>   
  47.                             {% endif %}
  48.                         </a>
  49.                     </div>   
  50.                     <div class="header-center">
  51.                         <div
  52.                             class="header-icon header-search header-search-inline header-search-category w-lg-max text-right mt-0">
  53.                             <a href="#" class="search-toggle" role="button"><i class="icon-search-3"></i></a>
  54.                             <form action="{{ path('b2c-search') }}" id="search-form" name="search-form" method="get">
  55.                                 <div class="header-search-wrapper">
  56.                                     <input type="search" class="form-control" name="term" id="term" value=""
  57.                                         placeholder="{{ 'Cerca prodotto...'|trans }}" required>
  58.                                     <div class="select-custom">
  59.                                         <select id="cat" name="cat">
  60.                                             {% if categories %}
  61.                                                 <option value="" selected data-href="{{ path('b2c-shop-category', {categoryname: 'ovunque',category: 0}) }}">{{ 'tutto il catalogo'|trans }}</option>
  62.                                                 {% for category in categories %}
  63.                                                     {% if params.cat is defined %}
  64.                                                         {% if params.cat == category.id %}
  65.                                                             <option value="{{category.Id}}" selected data-href="{{ path('b2c-shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
  66.                                                         {% else %}
  67.                                                             <option value="{{category.Id}}" data-href="{{ path('b2c-shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
  68.                                                         {% endif %}
  69.                                                     {% else %}
  70.                                                             <option value="{{category.Id}}" data-href="{{ path('b2c-shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
  71.                                                     {% endif %}
  72.                                                 {% endfor %}
  73.                                             {% endif %}
  74.                                         </select>
  75.                                     </div><!-- End .select-custom -->
  76.                                     <button class="btn icon-magnifier bg-dark text-white term-search-btn" title="search"
  77.                                         type="submit"></button>
  78.                                 </div><!-- End .header-search-wrapper -->
  79.                             </form>
  80.                         </div><!-- End .header-search -->
  81.                     </div>
  82.                     {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  83.                     <div class="header-right ml-0 ml-lg-auto">
  84.                         <a href="{{ path('b2c-account-profile') }}" class="pr-2 pr-xl-5 border-right border-dark d-none d-lg-block ">
  85.                             {{ 'Benvenuto'|trans }} {# <strong>{{app.user.firstname}} {{app.user.lastname}}</strong> #}
  86.                         </a>
  87.                         <a href="{{ path('account-logout') }}" class="pl-2 pl-xl-5 d-none d-lg-block " >
  88.                             {{ 'general.logout' | trans }}
  89.                         </a>
  90.                         <div class="language-container"></div>
  91.                     </div>
  92.                     {%  else %}
  93.                     <div class="header-right ml-0 ml-lg-auto">
  94.                         <a href="{{ path('account-login') }}" class="d-none d-lg-block login-lnk">
  95.                             {{ 'general.login' | trans }}
  96.                         </a>
  97.                         <div class="language-container"></div>
  98.                     </div>
  99.                     {% endif %}
  100.                 </div>
  101.             </div>
  102.             <div class="header-bottom sticky-header" data-sticky-options="{'mobile': false}">
  103.                 <!-- header sticky -->
  104.                 <div class="container">
  105.                     <div class="header-left">
  106.                         <a href="/" class="logo">
  107.                             <img src="/mecstore/b2c/assets/images/custom_icons/logo-mecstore.png" alt="Logo">
  108.                         </a>
  109.                     </div>
  110.                     <div class="header-center ml-4">
  111.                         <nav class="main-nav w-100">
  112.                             <ul class="menu">
  113.                                 <li class="mr-xl-5 mr-4" >
  114.                                     <a href="{{ prefix_language }}" class="page-index" data-name="app-index.php">Home</a>
  115.                                 </li>
  116.                                 <li class="mr-xl-5 mr-4" >
  117.                                     <a class="page-index">{{ 'catalogo'|trans }}</a>
  118.                                     <div class="megamenu megamenu-fixed-width megamenu-3cols">
  119.                                         <div class="row">
  120.                                             {% set count = 0%}
  121.                                             {% for category in app_category_get_data() %}
  122.                                             {% if (count == 0) %}<div class="col-lg-4">{% endif %}
  123.                                                 <ul class="submenu">
  124.                                                     <li><a href="{{ path('b2c-shop-category', {categoryname: category.key,category: category.id}) }}">{{ category.Name }}</a></li>
  125.                                                 </ul> 
  126.                                             {% set count = count + 1 %}                                        
  127.                                             {% if (count % 9 == 0) %} </div><div class="col-lg-4"> {% endif %}
  128.                                             {% endfor %}  
  129.                                             </div>                                            
  130.                                                 {#header - generate pimcore navigation #}
  131.                                                 
  132.                                                 {#header - navigation icons#}                                            
  133.                                         </div>
  134.                                     </div><!-- End .megamenu -->
  135.                                 </li>
  136.                                 <li class="mr-xl-5 mr-4" >
  137.                                     <a class="page-index">{{ 'FORNITORI'|trans }}</a>
  138.                                     <div class="megamenu megamenu-fixed-width megamenu-3cols providers">
  139.                                         <div class="row">
  140.                                             {% set count = 0%}
  141.                                             {% set brands = app_brand_get_data() %}
  142.                                             {% for brand in brands %}                                                                              
  143.                                             {% if (count == 0) %}<div class="col-lg-2">{% endif %}
  144.                                                 <ul class="submenu">                                                 
  145.                                                     {% if brand.enableDedicatedPage %}
  146.                                                     <li><a href="{{ path('b2c-brand', {brandname: brand.key,brand: brand.id}) }}">{{ brand.Name }}</a></li>
  147.                                                     {% else %}
  148.                                                     <li><a href="{{ path('b2c-shop-brand', {brandname: brand.key,brand: brand.id}) }}">{{ brand.Name }}</a></li>
  149.                                                     {% endif %}
  150.                                                 </ul> 
  151.                                             {% set count = count + 1 %}    
  152.                                             {% set elements_column = (brands|length //6) + 1 %}                        
  153.                                             {% if (count % elements_column == 0) %}</div><div class="col-lg-2"> {% endif %}
  154.                                             {% endfor %}  
  155.                                             <hr/>
  156.                                         </div>                                            
  157.                                                 {#header - generate pimcore navigation #}
  158.                                                 
  159.                                                 {#header - navigation icons#}                                            
  160.                                         </div>
  161.                                     </div><!-- End .megamenu -->
  162.                                 </li>
  163.                                 <li class="mr-xl-5 mr-4" >
  164.                                     <a href="{{ prefix_language }}about-us" class="page-index" data-name=" ">{{ 'il gruppo'|trans }}</a>
  165.                                 </li>
  166.                                 <li class="mr-xl-5 mr-4" >
  167.                                     <a href="{{ prefix_language }}b2c_shops" class="page-index" data-name=" ">{{ 'punti vendita'|trans }}</a>
  168.                                 </li>
  169.                                 <li class="mr-xl-5 mr-4" >
  170.                                     <a href="{{ prefix_language }}b2c_news" class="page-index" data-name="app-news.php">{{ 'News'|trans }}</a>
  171.                                 </li>
  172.                                 <li class="mr-xl-5 mr-4" >
  173.                                     <a href="{{ prefix_language }}catalogues" class="page-index" data-name=" ">{{ 'download'|trans }}</a>
  174.                                 </li>
  175.                                 <li class="mr-xl-5 mr-4" >
  176.                                     <a href="#" class="page-index" data-name=" ">{{ 'contattaci'|trans }}</a>
  177.                                     <ul>
  178.                                         <li><a href="{{ prefix_language }}contact-us" class="page-index" data-name=" ">{{ 'richiesta informazioni'|trans }}</a></li>
  179.                                         <li><a href="{{ prefix_language }}collaborations">{{ 'collaborazioni'|trans }}</a></li>
  180.                                         <li><a href="{{ prefix_language }}work-with-us">{{ 'lavora con noi'|trans }}</a></li>
  181.                                     </ul>
  182.                                 </li>
  183.                                 <li class="mr-xl-5 mr-4" >
  184.                                     <a href="https://mecstore.boels.com/it-it/noleggiare" class="page-index" target="_blank" data-name=" ">{{ 'noleggi'|trans }}</a>
  185.                                 </li>
  186.                                     <li class="float-right">
  187.                                         <a href="{{ path('b2c-shop-cart-detail') }}" class="icon-a page-index" data-name="{{ path('b2c-shop-cart-detail') }}">
  188.                                             <i class="fas fa-shopping-cart"></i>
  189.                                             <span class="cart-count badge-circle">{{ app_cart_items_count_b2c() }}</span>
  190.                                         </a>
  191.                                     </li> 
  192.                                     <li class="float-right">
  193.                                         <a class="icon-a page-index" href="{{ path('b2c-wishlist-index') }}" data-name="{{ path('b2c-wishlist-index') }}">
  194.                                             <i class="icon-star-empty"></i>
  195.                                             <span class="wishlist-count badge-circle sticky" style="display:none!important">{{ app_wish_list_count() }}</span>
  196.                                         </a>
  197.                                     </li>
  198.                                 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  199.                                     {# <li class="sticky-button mr-xl-5 mr-4" > #}
  200.                                     {# <li class="sticky-button one border-left border-dark pl-2 ">
  201.                                         <a href="app-my-mecstore.php" class="page-index" data-name="app-my-mecstore.php">my mecstore</a>
  202.                                     </li> #}                                                                
  203.                                     
  204.                                     <li class="float-right border-left border-right border-dark pl-2 pl-xl-5 pr-2 pr-xl-5 mymecstore" >
  205.                                         {% if wesbiteName == 'b2c' and app.user %}
  206.                                         <a href="{{path('b2c-account-index')}}" class="{{path('b2c-account-index')}}" ><span>my mecstore</span></a>
  207.                                         {% else %}
  208.                                         <a class="" ><span>my mecstore</span></a>
  209.                                         {% endif %}
  210.                                         
  211.                                         {% if wesbiteName == 'b2c' and app.user %}
  212.                                         {% else %}
  213.                                         <div class="megamenu megamenu-fixed-width b2c">
  214.                                             <div class="row">            
  215.                                                 {# <div class="col-lg">                                                    
  216.                                                     <ul class="submenu"> 
  217.                                                         <li><a href="{{ path('b2c-account-profile') }}">Profilo</a></li>
  218.                                                         <li><a href="{{path('b2c-account-index')}}">MY MECSTORE</a></li>                                                      
  219.                                                     </ul> 
  220.                                                 </div>  #}
  221.                                                 <div class="col-lg">
  222.                                                     <strong>B2B</strong>
  223.                                                     <ul class="submenu"> 
  224.                                                         <li><a href="{{  pimcore_url({'type': 'confirm'},'account-order-list',true,true) }}">Ordini inviati</a></li>
  225.                                                         <li><a href="{{  pimcore_url({'type': 'pre-ordini'},'account-order-list',true,true) }}">Preordini</a></li>
  226.                                                         <li><a href="{{  pimcore_url({'type': 'booked'},'account-order-list',true,true) }}">Prenotazioni</a></li>
  227.                                                         <li><a href="{{  pimcore_url({'type': 'draft'},'account-order-list',true,true) }}">Bozze ordini</a></li>
  228.                                                         {# <li><a href=""><strong>Note</strong></a></li> #}
  229.                                                     </ul> 
  230.                                                 </div>
  231.                                                 <div class="col-lg">
  232.                                                     <strong>B2C</strong>
  233.                                                     <ul class="submenu"> 
  234.                                                         <li><a href="{{ path('b2c-account-profile') }}">Profilo</a></li>
  235.                                                         <li><a href="">Preventivi</a></li>
  236.                                                         <li><a href="">Ordini ricevuti</a></li>
  237.                                                         <li><a href="">Contatti ricevuti</a></li>
  238.                                                         <li><a href="">Resi</a></li>
  239.                                                     </ul> 
  240.                                                 </div> 
  241.                                                 {# <div class="col-lg border-left">
  242.                                                     <ul class="submenu"> 
  243.                                                         <li><a href="">Anagrafica</a></li>
  244.                                                         <li><a href="">Rubrica indirizzi</a></li> 
  245.                                                     </ul> 
  246.                                                 </div>  #}
  247.                                             </div>                                            
  248.                                                     {#header - generate pimcore navigation #}
  249.                                                     
  250.                                                     {#header - navigation icons#}                                            
  251.                                             
  252.                                         </div>
  253.                                         {% endif %}<!-- End .megamenu -->
  254.                                     </li>
  255.                                  {% endif %}
  256.                                 {# <li class="sticky-button mr-xl-5 mr-4" > 
  257.                                     <a href="/my-mecstore" class="page-index" data-name="app-my-mecstore.php">my mecstore</a>
  258.                                 </li>
  259.                          
  260.                                 <li class="float-right" > 
  261.                                     <a href="app-cart.php" class="icon-a page-index" data-name="app-cart.php">
  262.                                         <i class="fas fa-shopping-cart"></i>
  263.                                         <span class="cart-count badge-circle">99</span>
  264.                                     </a>
  265.                                 </li>
  266.                                 <li class="float-right" > 
  267.                                     <a class="icon-a page-index" href="app-favourites.php" data-name="app-favourites.php">
  268.                                         <i class="icon-star-empty"></i>
  269.                                     </a>
  270.                                 </li>
  271.                                 <li class="float-right border-right border-dark pr-2 pr-xl-5 mr-3 mr-xl-5" >
  272.                                     <a class="page page-index" href="app-ordini.php" data-name="app-ordini.php">
  273.                                         ordini
  274.                                     </a>
  275.                                 </li>
  276.                                 <li class="float-right border-left border-dark pl-2 pl-xl-5" > 
  277.                                     <a class="page page-index" href="app-my-mecstore.php" data-name="app-my-mecstore.php">
  278.                                         my mecstore
  279.                                     </a>
  280.                                 </li> #}
  281.                             </ul>
  282.                         </nav>
  283.                     </div>
  284.                     <div class="header-right pr-4">
  285.                         <!-- HEADER SEARCH STICKY -->
  286.                         <div
  287.                             class="header-icon header-search header-search-popup header-search-category w-lg-max text-right">
  288.                             <a href="#" class="search-toggle" role="button"><i class="icon-search-3"></i></a>
  289.                             <!-- SEARCH INPUT -->
  290.                             <form action="#" method="get">
  291.                                 <div class="header-search-wrapper">
  292.                                     <input type="search" class="form-control" name="term_header" id="term_header" value="{% if params.term is defined %}{{ params.term }}{% endif %}"
  293.                                         placeholder="Cerca prodotto..." required>
  294.                                     <div class="select-custom">
  295.                                         <select id="cat_header" name="cat_header">
  296.                                             {% if categories %}
  297.                                                 <option value="" selected data-href="{{ path('shop-category', {categoryname: 'ovunque',category: 0}) }}">tutto il catalogo</option> 
  298.                                                 {% for category in categories %}
  299.                                                     {% if params.cat is defined %}                                                        
  300.                                                         {% if params.cat == category.id %}
  301.                                                             <option value="{{category.Id}}" selected data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>   
  302.                                                         {% else %}
  303.                                                             <option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>   
  304.                                                         {% endif %}  
  305.                                                     {% else %}
  306.                                                             <option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
  307.                                                     {% endif %} 
  308.                                                 {% endfor %}
  309.                                             {% endif %}                                         
  310.                                         </select>
  311.                                     </div><!-- End .select-custom -->
  312.                                     <button class="btn icon-search-3 bg-dark text-white p-0" title="search"
  313.                                         type="submit"></button>
  314.                                 </div><!-- End .header-search-wrapper -->
  315.                             </form>
  316.                         </div><!-- End .header-search -->
  317.                         
  318.                         <a href="{{ path('b2c-wishlist-index') }}" class="header-icon page-index icon-a " data-name="{{ path('b2c-wishlist-index') }}">
  319.                             <i class="icon-star-empty"></i>
  320.                             <span class="wishlist-count badge-circle sticky" style="display:none!important">{{ app_wish_list_count() }}</span>
  321.                         </a>
  322.                         <a href="{{ path('b2c-shop-cart-detail') }}" class="page-index icon-a " data-name="{{ path('b2c-shop-cart-detail') }}">
  323.                             <i class="fas fa-shopping-cart"></i>
  324.                             <span class="cart-count badge-circle sticky">{{ app_cart_items_count_b2c() }}</span>
  325.                         </a>
  326.                     </div>
  327.                 </div>
  328.             </div>
  329.         </header><!-- End .header -->
  330. {% endblock %}