templates/Frontend/main_menu.html.twig line 1

Open in your IDE?
  1. <!-- Header -->
  2. <header>
  3.     <!-- Header desktop -->
  4.     <div class="container-menu-desktop fix-menu-desktop">
  5.         <div class="wrap-menu-desktop">
  6.             
  7.             <nav class="limiter-menu-desktop container">
  8.                 
  9.                 <!-- Logo desktop -->
  10.                 <a href="#" class="logo">
  11.                     <!--img src="<?php echo $main->cleanUrl($webSetting['logo_path']) ?>" style='max-height:65px' alt=""-->
  12.                     {% if settings %}
  13.                         <img src="{{settings.logoPath}}" style='max-height:60px'>
  14.                     {% endif %}
  15.                 </a>
  16.                 <!-- Menu desktop -->
  17.                 <div class="menu-desktop">
  18.                     <ul class="main-menu">
  19.                     
  20.                         <li class="{% if routeName == '/' %}active-menu{% endif %}">
  21.                             <a href="{{ path('frontend_index', {slug: client.slug}) }}">Inicio</a>                                
  22.                         </li>
  23.                         {% if settings and settings.brandMenuFeatured == '1' %}
  24.                             <li class="nav-item dropdown">
  25.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> {{settings.brandMenuTitle}} </a>
  26.                                 <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
  27.                                     {% for brand in brands %}
  28.                                         {% if brand.categories | length > 0 %}
  29.                                             <li class="dropdown-submenu">
  30.                                                 <a class="dropdown-item dropdown-toggle" aria-expanded="false" href="#">{{brand.name}}</a>
  31.                                                 <ul class="dropdown-menu">
  32.                                                     {% for category in brand.categories %}
  33.                                                         <li><a class="dropdown-item" href="{{ path('frontend_product', {'brand': brand.brand_id, 'category': category.category_id, slug:client.slug }) }}">{{category.name}}</a></li>
  34.                                                     {% endfor %}
  35.                                                 </ul>
  36.                                             </li>                                                                   
  37.                                         {% else %}
  38.                                              <li><a class="dropdown-item" href="{{ path('frontend_product', {'brand': brand.brand_id, slug:client.slug}) }}">{{brand.name}}</a></li>
  39.                                         {% endif %}
  40.                                     {% endfor %}
  41.                                     
  42.                                 </ul>
  43.                             </li>
  44.                                                
  45.                         {% endif %}
  46.                         {% if settings and settings.categoryMenuFeatured == '1' %}
  47.                             <li class="nav-item dropdown">
  48.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> {{settings.categoryMenuTitle}} </a>
  49.                                 <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
  50.                                     {%for category in categories %}
  51.                                         <li><a class="dropdown-item" href="{{ path('frontend_product', {'category': category.categoryId, slug:client.slug}) }}">{{category.name}}</a></li>
  52.                                     {%endfor%}
  53.                                      <li><a class="dropdown-item" href="{{ path('frontend_product', {slug:client.slug}) }}">Todos los productos</a></li>
  54.                                 </ul>
  55.                             </li>
  56.                                                                        
  57.                         {% else %}
  58.                         <li class="{% if routeName == '/products' %}active-menu{% endif %}">
  59.                             <a href="{{ path('frontend_product', {slug: client.slug}) }}">Productos</a>                                
  60.                         </li>    
  61.                         {% endif %}
  62.                         <li class="{% if routeName == '/blog' %}active-menu{% endif %}">
  63.                             <a href="{{ path('frontend_blog', {slug: client.slug}) }}">Blog</a>                                
  64.                         </li>                                                
  65.                                             
  66.                     </ul>
  67.                 </div>    
  68.                 <!-- Icon header -->
  69.                 <div class="wrap-icon-header flex-w flex-r-m">
  70.                     <div class="icon-header-item cl2 hov-cl1 trans-04 p-l-22 p-r-11 js-show-modal-search">
  71.                         <i class="zmdi zmdi-search"></i>
  72.                     </div>
  73.                     {% if customerData.name is defined %}
  74.                         {% if customerData == '' %}
  75.                             <a href="{{path('frontend_customer_login')}}" style="color:black">
  76.                                 Iniciar Sesión
  77.                             </a>
  78.                         {% else %}   
  79.                                 <a href="#" style="color:black" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
  80.                                     <i class="fa fa-user-circle"></i>
  81.                                 </a>
  82.                                 <div class="dropdown-menu dropdown-menu-right profile-notification " style="padding:15px;">
  83.                                         <div class="pro-head">
  84.                                             <span><b style="margin-left:15px">{{customerData.name}}</b></span>
  85.                                         </div>
  86.                                         <ul class="pro-body">
  87.                                             <li>
  88.                                                 <a href="{{path('frontend_customer_lobby', {slug:slug})}}" class="dropdown-item"> Mi cuenta</a>
  89.                                             </li>
  90.                                             <li>
  91.                                                 <a href="{{path('frontend_logout_customer', {slug:slug})}}" class="dropdown-item"> Cerrar Sesión</a>
  92.                                             </li>
  93.                                         </ul>
  94.                                 </div>
  95.                             </div>                              
  96.                         {% endif %}
  97.                     {% else %}    
  98.                         <a href="{{path('frontend_customer_login', {slug:slug})}}" style="color:black">
  99.                             Iniciar Sesión
  100.                         </a>
  101.                     {% endif %}
  102.                     <!-- Carga dinamica de carrito -->
  103.                     <div class='cart_container' id='main_cart_container'></div>
  104.                     
  105.                     <!--a href="#" class="dis-block icon-header-item cl2 hov-cl1 trans-04 p-l-22 p-r-11 icon-header-noti" data-notify="0">
  106.                         <i class="zmdi zmdi-favorite-outline"></i>
  107.                     </a-->
  108.                 
  109.             </nav>
  110.         </div>    
  111.     </div>
  112.     <!-- Header Mobile -->
  113.     <div class='mobile-fixed'>
  114.     <div class="wrap-header-mobile">
  115.         <!-- Logo moblie -->    
  116.                 
  117.         <div class="logo-mobile">
  118.             
  119.             <a href="{{ path('frontend_index', {slug: client.slug}) }}">
  120.                 {% if settings and settings.logoPath %}
  121.                     <img src="{{settings.logoPath}}" style='max-height:65px' alt="">
  122.                 {% endif %}
  123.             </a>
  124.                     
  125.         </div>
  126.         
  127.         
  128.             
  129.         
  130.         <!-- Icon header -->
  131.         <div class="wrap-icon-header flex-w flex-r-m m-r-15">
  132.             <div class="icon-header-item cl2 hov-cl1 trans-04 p-r-11 js-show-modal-search">
  133.                 <i class="zmdi zmdi-search"></i>
  134.             </div>
  135.             <div class='cart_container'></div>
  136.             <!--a href="#" class="dis-block icon-header-item cl2 hov-cl1 trans-04 p-r-11 p-l-10 icon-header-noti" data-notify="0">
  137.                 <i class="zmdi zmdi-favorite-outline"></i>
  138.             </a-->
  139.         </div>
  140.         <!-- Button show menu -->
  141.         <div class="btn-show-menu-mobile hamburger hamburger--squeeze">
  142.             <span class="hamburger-box">
  143.                 <span class="hamburger-inner"></span>
  144.             </span>
  145.         </div>
  146.     </div>
  147.     </div>
  148.     <!-- Menu Mobile -->
  149.     <div class="menu-mobile">
  150.             <ul class="main-menu-m">
  151.                 {% if customerData.name is defined %}
  152.                                 {% if customerData == '' %}
  153.                                     <li>
  154.                                         <a href="{{path('frontend_customer_login', {slug:slug})}}" style="color:white">
  155.                                             Iniciar Sesión
  156.                                         </a>
  157.                                     </li>
  158.                                 {% else %}                                            
  159.                                     <li>
  160.                                         <a href="{{path('frontend_customer', {slug:slug})}}"><i class="fa fa-user-circle"></i> &nbsp;Mi cuenta</a>
  161.                                     </li>
  162.                                     <li>
  163.                                         <a href="{{path('frontend_logout_customer', {slug:slug})}}" > Cerrar Sesión</a>
  164.                                     </li>
  165.                                 {% endif %}
  166.                 {% else %}    
  167.                     <li><a href="{{path('frontend_customer_login', {slug:slug})}}" style="color:white">
  168.                         Iniciar Sesión
  169.                         </a></li>
  170.             
  171.                 {% endif %}
  172.             <li>
  173.                 <a href="{{ path('frontend_index', {slug: client.slug}) }}">Inicio</a>                                
  174.             </li>    
  175.             {% if settings and settings.brandMenuFeatured == '1' %}
  176.                 <li class="nav-item dropdown" >
  177.                     <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> {{settings.brandMenuTitle}} </a>
  178.                     <ul class="dropdown-menu main-menu-m" aria-labelledby="navbarDropdownMenuLink" >
  179.                         {% for brand in brands %}                            
  180.                             <li><a class="dropdown-item dropdown-item-mobile" href="{{ path('frontend_product', {'brand': brand.brand_id, slug: client.slug}) }}">{{brand.name}}</a></li>                            
  181.                         {% endfor %}                        
  182.                     </ul>
  183.                 </li>                                
  184.             {% endif %}
  185.             {% if settings and settings.categoryMenuFeatured == '1' %}
  186.                 <li class="nav-item dropdown" >
  187.                     <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> {{settings.categoryMenuTitle}} </a>
  188.                     <ul class="dropdown-menu main-menu-m " aria-labelledby="navbarDropdownMenuLink" >
  189.                         {% for category in categories %}
  190.                             <li><a class="dropdown-item dropdown-item-mobile" href="{{ path('frontend_product', {'category': category.categoryId}) }}">{{category.name}}</a></li>
  191.                         {% endfor %}
  192.                             <li><a class="dropdown-item dropdown-item-mobile" href="{{ path('frontend_product', {slug:client.slug}) }}">Todos los productos</a></li>
  193.                     </ul>
  194.                 </li>                                                                 
  195.             {% else %}
  196.                 <li class="{% if routeName == '/products' %}active-menu{% endif %}">
  197.                     <a href="{{ path('frontend_product', {slug:client.slug}) }}">Productos</a>                                
  198.                 </li>    
  199.             {% endif %}                            
  200.             </li>    
  201.                         
  202.             <li>
  203.                 <a href="{{ path('frontend_blog', {slug: client.slug}) }}">Blog</a>                                
  204.             </li>    
  205.             
  206.             {#    
  207.             <?php foreach($sections as $section): ?>
  208.                 <?php
  209.                 
  210.                 $slug $main->slugify($section['label']);
  211.                 
  212.                 ?>
  213.                 <?php if($section['page_type_id'] != 4): ?>
  214.                     <li>
  215.                         <a href="<?php echo $root_link."/".$slug ?>" id='main_nav_<?php echo $section['page_type_id'?>'><?php echo $section['label'?></a>                                
  216.                     </li>
  217.                 <?php endif; ?>
  218.             <?php endforeach; ?>
  219.             #}                        
  220.         </ul>
  221.     </div>
  222.     <!-- Modal Search -->
  223.     <div class="modal-search-header flex-c-m trans-04 js-hide-modal-search">
  224.         <div class="container-search-header">
  225.             <button class="flex-c-m btn-hide-modal-search trans-04 js-hide-modal-search">
  226.                 <i class='fa fa-times'></i>&nbsp;&nbsp;Cerrar
  227.             </button>
  228.             <form method='post' id='global_search' class="wrap-search-header flex-w p-l-15">
  229.                 <button class="flex-c-m trans-04">
  230.                     <i class="zmdi zmdi-search"></i>
  231.                 </button>
  232.                 <input class="plh3" type="text" id='search' name="search" placeholder="Búsqueda...">
  233.             </form>
  234.         </div>
  235.     </div>
  236. </header> 
  237. <br>
  238. <!-- Cart -->
  239. <div class="wrap-header-cart js-panel-cart">
  240.     <div class="s-full js-hide-cart"></div>
  241.     <div class="header-cart flex-col-l p-l-20 p-r-20">
  242.         <div class="header-cart-title flex-w flex-sb-m p-b-8">
  243.             <span class="mtext-103 cl2">
  244.                 {#
  245.                 <?php echo $clientInfo['item_list_page_title'?>
  246.                 #}                
  247.             </span>
  248.             <div class="fs-35 lh-10 cl2 p-lr-5 pointer hov-cl1 trans-04 js-hide-cart" style="position:absolute;top:10px;right:10px;">
  249.                 <i class="zmdi zmdi-close"></i>
  250.             </div>
  251.         </div>
  252.         
  253.         <div class="header-cart-content flex-w js-pscroll" style='width:100%'>
  254.             <div id='cart_preview'></div>
  255.             <br>
  256.             <div class="w-full">                
  257.                 <div class="header-cart-buttons flex-w w-full">
  258.                     <!--a href="shoping-cart.html" class="flex-c-m stext-101 cl0 size-107 bg3 bor2 hov-btn3 p-lr-15 trans-04 m-r-8 m-b-10">
  259.                         View Cart
  260.                     </a-->
  261.                     {#
  262.                     <a href="<?php echo $root_link."checkout" ?>" class="flex-c-m btn-block btn-full stext-101 cl0 size-107 bg3 bor2 hov-btn3 p-lr-15 trans-04 m-b-10">
  263.                         <?php echo $clientInfo['cart_finish_btn_label'?>
  264.                     </a>
  265.                     #}
  266.                 </div>
  267.             </div>
  268.         </div>
  269.     </div>
  270. </div>
  271. <div class="modal fade" id="viewContentRegister">
  272.     <div class="modal-dialog modal-md">
  273.         <div class="modal-content">
  274.             <div class="modal-header" style="padding:5px !important;">
  275.                 <h5 class="modal-title" style="color:black;padding:5px">Crear cuenta</h5>
  276.                 <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:#ccc">×</span></button>
  277.             </div>
  278.             <div class="modal-body" style="padding:18px;">
  279.                 <form action="{{ path('frontend_register_customer', {slug:slug}) }}" method="post" id="registerForm">
  280.                     <div style="display:none;" id="success_alert" class="alert alert-success alert-dismissible">                        
  281.             Cuenta creada correctamente, inicie sesión.
  282.                     </div>
  283.                     <input type="hidden" id='autologin' name='_autologin' value='true'>
  284.                     <div style="display:none;" id="danger_alert" class="alert alert-danger alert-dismissible ">                        
  285.             El email ya se encuentra registrado.
  286.                     </div>
  287.                     <div class="form-group">
  288.                         <label>* Nombre</label>
  289.                         <input type="text" class="form-control" placeholder="Nombre" name="_name" id="name" required>
  290.                     </div>
  291.                     <div class="form-group">
  292.                         <label>* Email</label>
  293.                         <input style="width:100%;" type="email" class="form-control" placeholder="Email" name="_username" id="email" required>
  294.                         <small id="email_incorrect" style="display:none;color:tomato">Ingrese un formato válido de email</small>
  295.                         <small id="email_exist" style="display:none;color:tomato">El email ya se encuentra registrado</small>
  296.                     </div>
  297.                     <div class="form-group">
  298.                         <label>* Contraseña</label>
  299.                         <input style="width:100%;" type="password" onkeyup="validarPassword();" class="form-control" name="_password" placeholder="Contraseña" id="password" required>
  300.                     </div>
  301.                     <div class="form-group">
  302.                         <label>* Confirmar contraseña</label>
  303.                         <input type="password" onkeyup="validarPassword();" class="form-control" name="_passwordconfirm" placeholder="Contraseña" id="confirm_password" required>
  304.                         <small id="password_incorrect" style="display:none">Las contraseñas no coinciden</small>
  305.                     </div>                    
  306.                     <small id="form_incorrect" style="display:none;color:tomato">¡Completa todos los campos del formulario!</small>
  307.                     <br><br>
  308.                     <center>
  309.                         <button type="button" id="btn-register" onclick="register();" class="btn-login btn btn-primary shadow-2 mb-6">Guardar</button>
  310.                     </center>
  311.                     
  312.                 </form>
  313.             </div>
  314.         <!-- /.modal-content -->
  315.         </div>
  316.     <!-- /.modal-dialog -->
  317.     </div>
  318. </div>   
  319. {% block css %}
  320.     <style>
  321.         .form-control{
  322.             height: 45px !important;
  323.         }
  324.         .btn-login{
  325.             width: 40%;
  326.             height: 45px;
  327.         }
  328.        .dropdown-submenu {
  329.             position: relative;
  330.         }
  331.         .dropdown-item-mobile{
  332.             color:white;
  333.         }
  334.         .dropdown-submenu>.dropdown-menu {
  335.             top: 0;
  336.             left: 100%;
  337.             margin-top: -6px;
  338.             margin-left: -1px;
  339.             -webkit-border-radius: 0 6px 6px 6px;
  340.             -moz-border-radius: 0 6px 6px;
  341.             border-radius: 0 6px 6px 6px;
  342.         }
  343.         .dropdown-submenu:hover>.dropdown-menu {
  344.             display: block;
  345.         }
  346.         .dropdown-submenu>a:after {
  347.             display: block;
  348.             content: " ";
  349.             float: right;
  350.             width: 0;
  351.             height: 0;
  352.             border-color: transparent;
  353.             border-style: solid;
  354.             border-width: 5px 0 5px 5px;
  355.             border-left-color: #ccc;
  356.             margin-top: 5px;
  357.             margin-right: -10px;
  358.         }
  359.         .dropdown-submenu:hover>a:after {
  360.             border-left-color: #fff;
  361.         }
  362.         .dropdown-submenu.pull-left {
  363.             float: none;
  364.         }
  365.         .dropdown-submenu.pull-left>.dropdown-menu {
  366.             left: -100%;
  367.             margin-left: 10px;
  368.             -webkit-border-radius: 6px 0 6px 6px;
  369.             -moz-border-radius: 6px 0 6px 6px;
  370.             border-radius: 6px 0 6px 6px;
  371.         }
  372.       
  373.     </style>
  374. {% endblock %}
  375. {% block title %}
  376.     hola
  377. {% endblock %}    
  378. {% block script %}
  379.     <script>
  380.         function openModalRegisterLogin(){
  381.             $('#autologin').val('true');
  382.         }
  383.         function openModalRegister(){
  384.             $('#autologin').val('false');
  385.         }
  386.     </script>
  387. {% endblock %}