{% block content %}
{% set totalAmount = ((totalAmount is defined) and totalAmount)%}
{% set categories = app_category_get_data() %}
{% set params = app_get_params() %}
{% set userType = (app.user)?app.user.UserType:'' %}
{% set role = (app.user)?app.user.UserRoles:'' %}
<header class="header box-shadow">
<div class="header-middle sticky-header" data-sticky-options="{'mobile': true}">
<div class="container">
<div class="header-left">
<button class="mobile-menu-toggler" type="button">
<i class="fas fa-bars fa-2x"></i>
<!-- <img src="/mecstore/assets/images/custom/logo-soci.png" alt="Mecstore" width="111" height="44"> -->
</button>
<a href="/" class="logo">
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<img src="/mecstore/assets/images/custom/logo-soci.png" alt="Mecstore" class="d-block" width="262" height="auto" >
{% else %}
<img src="/mecstore/b2c/assets/images/custom/logo.png" alt="Mecstore" class="d-block" width="262" height="auto" >
{% endif %}
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<a href="{{ path('account-index') }}" class="d-block d-lg-none text-dark">
Benvenuto {# <strong>{{app.user.firstname}} {{app.user.lastname}}</strong> #}
</a>
{% endif %}
</a>
</div>
<div class="header-center">
<div
class="header-icon header-search header-search-inline header-search-category w-lg-max text-right mt-0">
<a href="#" class="search-toggle" role="button"><i class="icon-search-3"></i></a>
<form action="{{ path('search') }}" id="search-form" name="search-form" method="get">
<div class="header-search-wrapper">
<input type="search" class="form-control" name="term" id="term" value=""
placeholder="Cerca prodotto..." required>
<div class="select-custom">
<select id="cat" name="cat">
{% if categories %}
<option value="" selected data-href="{{ path('shop-category', {categoryname: 'ovunque',category: 0}) }}">tutto il catalogo</option>
{% for category in categories %}
{% if params.cat is defined %}
{% if params.cat == category.id %}
<option value="{{category.Id}}" selected data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% else %}
<option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% endif %}
{% else %}
<option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div><!-- End .select-custom -->
<button class="btn icon-magnifier bg-dark text-white term-search-btn" title="search"
type="submit"></button>
</div><!-- End .header-search-wrapper -->
</form>
</div><!-- End .header-search -->
</div>
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<div class="header-right ml-0 ml-lg-auto">
{% if role == 'Manager' %}
{% set sp_selected = 'socio' %}
{% if ms_price_view == 'vendita' %}
{% set sp_selected = 'vendita' %}
{% endif %}
<select class="custom-select switch-prezzi" name="switch-prezzi">
<option value="socio" {% if sp_selected == 'socio' %}selected{% endif %}>Socio</option>
<option value="vendita" {% if sp_selected == 'vendita' %}selected{% endif %}>Vendita</option>
</select>
{% endif %}
<a href="{{ path('account-index') }}" class="pr-2 pr-xl-5 border-right border-dark d-none d-lg-block ">
Benvenuto {# <strong>{{app.user.firstname}} {{app.user.lastname}}</strong> #}
</a>
<a href="{{ path('account-logout') }}" class="pl-2 pl-xl-5 d-none d-lg-block " >
{{ 'general.logout' | trans }}
</a>
</div>
{% else %}
<div class="header-right ml-0 ml-lg-auto">
<a href="{{ path('account-login') }}" class="pr-2 pr-xl-5 border-right border-dark d-none d-lg-block login-lnk">
{{ 'general.login' | trans }}
</a>
</div>
{% endif %}
</div>
</div>
<div class="header-bottom sticky-header" data-sticky-options="{'mobile': false}">
<!-- header sticky -->
<div class="container">
<div class="header-left">
<a href="/" class="logo">
<img src="/mecstore/assets/images/custom_icons/logo-mecstore.png" alt="Logo">
</a>
</div>
<div class="header-center ml-4">
<nav class="main-nav w-100">
<ul class="menu">
<li class="mr-xl-5 mr-4" >
<a href="/" class="page-index" data-name="/">Home</a>
</li>
<li class="mr-xl-5 mr-4" >
<a class="page-index">catalogo</a>
<div class="megamenu megamenu-fixed-width megamenu-3cols">
<div class="row">
{% set count = 0%}
{% for category in app_category_get_data() %}
{% if (count == 0) %}<div class="col-lg-4">{% endif %}
<ul class="submenu">
<li><a href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{ category.Name }}</a></li>
</ul>
{% set count = count + 1 %}
{% if (count % 9 == 0) %} </div><div class="col-lg-4"> {% endif %}
{% endfor %}
</div>
{#header - generate pimcore navigation #}
{#header - navigation icons#}
</div>
</div><!-- End .megamenu -->
</li>
<li class="mr-xl-5 mr-4" >
<a class="page-index">FORNITORI</a>
<div class="megamenu megamenu-fixed-width megamenu-3cols providers">
<div class="row">
{% set count = 0%}
{% set brands = app_brand_get_data() %}
{% for brand in brands %}
{% if (count == 0) %}<div class="col-lg-2">{% endif %}
<ul class="submenu">
{% if brand.enableDedicatedPage %}
<li><a href="{{ path('shop-brand-product', {brandname: brand.key,brand: brand.id}) }}">{{ brand.Name }}</a></li>
{% else %}
<li><a href="{{ path('shop-brand', {brandname: brand.key,brand: brand.id}) }}">{{ brand.Name }}</a></li>
{% endif %}
</ul>
{% set count = count + 1 %}
{% set elements_column = (brands|length //6) + 1 %}
{% if (count % elements_column == 0) %}</div><div class="col-lg-2"> {% endif %}
{% endfor %}
<hr/>
</div>
{#header - generate pimcore navigation #}
{#header - navigation icons#}
</div>
</div><!-- End .megamenu -->
</li>
{# <li class="mr-xl-5 mr-4" >
<!-- to do -->
<a class="page-index" data-name="app-forniture.php">fornitori</a>
<div class="megamenu megamenu-fixed-width">
<div class="row">
<div class="col-lg-4">
<a href="#" class="nolink">PRODUCT PAGES</a>
<ul class="submenu">
<li><a href="demo21-product.html">SIMPLE PRODUCT</a></li>
<li><a href="product-variable.html">VARIABLE PRODUCT</a></li>
<li><a href="demo21-product.html">SALE PRODUCT</a></li>
<li><a href="demo21-product.html">FEATURED & ON SALE</a></li>
<li><a href="product-custom-tab.html">WITH CUSTOM TAB</a></li>
<li><a href="product-sidebar-left.html">WITH LEFT SIDEBAR</a></li>
<li><a href="product-sidebar-right.html">WITH RIGHT SIDEBAR</a></li>
<li><a href="product-addcart-sticky.html">ADD CART STICKY</a></li>
</ul>
</div><!-- End .col-lg-4 -->
<div class="col-lg-4">
<a href="#" class="nolink">PRODUCT LAYOUTS</a>
<ul class="submenu">
<li><a href="product-extended-layout.html">EXTENDED LAYOUT</a></li>
<li><a href="product-grid-layout.html">GRID IMAGE</a></li>
<li><a href="product-full-width.html">FULL WIDTH LAYOUT</a></li>
<li><a href="product-sticky-info.html">STICKY INFO</a></li>
<li><a href="product-sticky-both.html">LEFT & RIGHT STICKY</a></li>
<li><a href="product-transparent-image.html">TRANSPARENT IMAGE</a>
</li>
<li><a href="product-center-vertical.html">CENTER VERTICAL</a></li>
<li><a href="#">BUILD YOUR OWN</a></li>
</ul>
</div><!-- End .col-lg-4 -->
<div class="col-lg-4 p-0">
<div class="menu-banner menu-banner-2">
<figure>
<img src="/mecstore/assets/images/custom_placeholders/product3.png" alt="Menu banner"
class="product-promo" width="380" height="790">
</figure>
<i>OFF</i>
<div class="banner-content">
<h4>
<span class="">UP TO</span><br />
<b class="">50%</b>
</h4>
</div>
<a href="category.html" class="btn btn-sm btn-dark">SHOP NOW</a>
</div>
</div><!-- End .col-lg-4 -->
</div><!-- End .row -->
</div><!-- End .megamenu -->
</li> #}
{% if allow_user('view_news') %}
<li class="mr-xl-5 mr-4" >
<a href="/news" class="page-index" data-name="/news">News</a>
</li>
{% endif %}
{% if allow_user('commercial_agreement') or allow_user('administratives_agreement') %}
{% if app.user.userRoles != 'Affiliate' and app.user.userRole[0] != '/Master/UserRoles/Warehouseman' %}
<li class="mr-xl-5 mr-4">
<a class="page-index sf-with-ul" data-name="app-accordi-commerciali.php">area documentale</a>
<ul style="display: none; white-space:nowrap;">
<li><a href="{{ pimcore_url({},'aggiornamentoprezzi-listing',true,true) }}">aggiornamento prezzi</a></li>
{% if allow_user('commercial_agreement') %}
<li><a href="{{ pimcore_url({'type': 'commerciali','id':''},'documentation-listing',true,true) }}">accordi commerciali</a></li>
{% endif %}
{% if allow_user('administratives_agreement') %}
<li><a href="{{ pimcore_url({'type': 'amministrativa','id':''},'documentation-listing',true,true) }}">area amministrativa</a></li>
{% endif %}
</ul>
</li>
{% endif %}
{% endif %}
<li class="mr-xl-5 mr-4" >
<a href="{{ path('marketplace-listing') }}" class="page-index" data-name="mercatino soci">mercatino soci</a>
</li>
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
{# <li class="sticky-button mr-xl-5 mr-4" > #}
{# <li class="sticky-button one border-left border-dark pl-2 ">
<a href="app-my-mecstore.php" class="page-index" data-name="app-my-mecstore.php">my mecstore</a>
</li> #}
{#
<li><a href="">Anagrafica</a></li>
<li><a href="">Rubrica indirizzi</a></li>
#}
{# <li class="sticky-button mr-xl-5 mr-4" > #}
{# <li class="sticky-button two border-right border-dark pr-2 mr-3 ">
<a href="{{ pimcore_url({'type': 'confirm'},'account-order-list',true,true) }}" class="page-index">ordini</a>
</li> #}
{% if allow_user('draft_create') or allow_user('booking_create') or allow_user('order_create') %}
{% if app.user.partner.isMecstoreHQ != true %}
<li class="float-right">
<a href="{{ path('shop-cart-detail') }}" class="icon-a page-index" data-name="{{ path('shop-cart-detail') }}">
<i class="fas fa-shopping-cart"></i>
<span class="cart-count badge-circle">{{ app_cart_items_count() }}</span>
</a>
</li>
{% endif %}
{% endif %}
<li class="float-right">
<a class="icon-a page-index" href="{{ path('wishlist-index') }}" data-name="{{ path('wishlist-index') }}">
<i class="icon-star-empty"></i>
<span class="wishlist-count badge-circle sticky" style="display:none!important">{{ app_wish_list_count() }}</span>
</a>
</li>
{#{% if allow_user('draft_create') or allow_user('booking_create') or allow_user('order_create') or allow_user('order_view') %}
<li class="float-right border-right border-dark pr-2 pr-xl-5 mr-3 mr-xl-5">
<a class="page page-index" href="{{ pimcore_url({'type': 'confirm'},'account-order-list',true,true) }}">
ordini
</a>
</li>
{% endif %}#}
{% if allow_user('draft_create') or allow_user('booking_create') or allow_user('order_create') or allow_user('order_view') %}
{# <li class="float-right border-left border-dark pl-2 pl-xl-5 ">
<a class="page page-index" href="{{ path('account-index') }}" data-name="{{ path('account-index') }}">
my mecstore
</a>
</li>#}
<li class="float-right border-left border-right border-dark pl-2 pl-xl-5 pr-2 pr-xl-5 mymecstore" >
<a class="" ><span>my mecstore</span></a>
<div class="megamenu megamenu-fixed-width">
<div class="row">
<div class="col-lg">
<strong>B2B</strong>
<ul class="submenu">
{% if app.user.partner.isMecstoreHq %}
<li><a href="{{ pimcore_url({'type': 'ordini'},'account-order-list',true,true) }}">Ordini</a></li>
<li><a href="{{ pimcore_url({'type': 'impegnati'},'account-order-list',true,true) }}">Impegnati</a></li>
<li><a href="{{ pimcore_url({'type': 'riepilogo'},'account-order-list',true,true) }}">Riepilogo</a></li>
{# <li><a href="{{ pimcore_url({'type': 'bozze-ordini'},'account-order-list',true,true) }}">Bozze ordini</a></li> #}
{% else %}
<li><a href="{{ pimcore_url({'type': 'confirm'},'account-order-list',true,true) }}">Ordini inviati</a></li>
{# {% if app.user.userRoles != 'Affiliate' %} #}
<li><a href="{{ pimcore_url({'type': 'pre-ordini'},'account-order-list',true,true) }}">Preordini</a></li>
<li><a href="{{ pimcore_url({'type': 'booked'},'account-order-list',true,true) }}">Prenotazioni</a></li>
{# {% endif %} #}
<li><a href="{{ pimcore_url({'type': 'draft'},'account-order-list',true,true) }}">Bozze ordini</a></li>
{% endif %}
{# <li><a href=""><strong>Note</strong></a></li> #}
</ul>
</div>
{# {% if app.user.userRoles != 'Affiliate' %} #}
{% if app.user.userRole[0] != '/Master/UserRoles/Warehouseman' and app.user.userRoles != 'Affiliate' %}
<div class="col-lg">
<strong>B2C</strong>
<ul class="submenu">
<li><a href="{{ pimcore_url({"type":"sent_to_customer"},'quote-branch-listing',true,true) }}">Preventivi</a></li>
<li><a href="{{ pimcore_url({"type":"confirmed_quote"},'quote-branch-listing',true,true) }}">Preventivi Confermati</a></li>
<li><a href="{{ pimcore_url({"type":"not_processed"},'quote-branch-listing',true,true) }}">Contatti ricevuti</a></li>
{# <li><a href="">Resi</a></li> #}
</ul>
</div>
{% endif %}
{# {% endif %} #}
<div class="col-lg border-left">
<ul class="submenu">
{# <li><a href="">Anagrafica</a></li>
<li><a href="">Rubrica indirizzi</a></li> #}
</ul>
</div>
</div>
{#header - generate pimcore navigation #}
{#header - navigation icons#}
</div>
</div><!-- End .megamenu -->
</li>
{% endif %}
{% endif %}
</ul>
</nav>
</div>
<div class="header-right pr-4">
<!-- HEADER SEARCH STICKY -->
<div
class="header-icon header-search header-search-popup header-search-category w-lg-max text-right">
<a href="#" class="search-toggle" role="button"><i class="icon-search-3"></i></a>
<!-- SEARCH INPUT -->
{# <form action="{{ path('search') }}" id="search-form" name="search-form" method="get"> #}
<div class="header-search-wrapper">
<input type="search" class="form-control" name="term_header" id="term_header" value="{% if params.term is defined %}{{ params.term }}{% endif %}"
placeholder="Cerca prodotto..." required>
<div class="select-custom">
<select id="cat_header" name="cat_header">
{% if categories %}
<option value="" selected data-href="{{ path('shop-category', {categoryname: 'ovunque',category: 0}) }}">tutto il catalogo</option>
{% for category in categories %}
{% if params.cat is defined %}
{% if params.cat == category.id %}
<option value="{{category.Id}}" selected data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% else %}
<option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% endif %}
{% else %}
<option value="{{category.Id}}" data-href="{{ path('shop-category', {categoryname: category.key,category: category.id}) }}">{{category.Name}}</option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div><!-- End .select-custom -->
<button class="btn icon-search-3 bg-dark text-white p-0 term-search-btn-header" title="search"
type="button"></button>
</div><!-- End .header-search-wrapper -->
{# </form> #}
</div><!-- End .header-search -->
{% if allow_user('draft_create') or allow_user('booking_create') or allow_user('order_create') or allow_user('order_view') %}
<a href="{{ path('wishlist-index') }}" class="header-icon page-index icon-a " data-name="{{ path('wishlist-index') }}">
<i class="icon-star-empty"></i>
<span class="wishlist-count badge-circle sticky" style="display:none!important">{{ app_wish_list_count() }}</span>
</a>
{% if app.user.partner.isMecstoreHQ != true %}
<a href="{{ path('shop-cart-detail') }}" class="page-index icon-a " data-name="{{ path('shop-cart-detail') }}">
<i class="fas fa-shopping-cart"></i>
<span class="cart-count badge-circle sticky">{{ app_cart_items_count() }}</span>
</a>
{% endif %}
{% endif %}
</div>
</div>
</div>
</header><!-- End .header -->
{% endblock %}