templates/basic/buscador.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3.  {{ include('basic/canales.html.twig') }}
  4.     {% set currentPath = path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}
  5.     <div id="path" data-val="{{ currentPath }}"></div>
  6.     <div class="categorias">
  7.         {# imagen banner por categorias #}
  8.         {{ include('basic/banner.html.twig') }}
  9.     </div>
  10.     {# banner de firmezas #}
  11.     <div class="control-firmeza d-flex justify-content-between align-items-center px-2 px-md-0">
  12.         {% for sub in subcategorias %}
  13.         <div class="cont-opcion {% if referencia == sub.id %} active {% endif %}" id="sub_{{ sub.id }}">
  14.             {% set slugcategoria = principal.slug %}
  15.             <div class="opcion opciones px-2 px-md-3 px-lg-2 py-3 py-md-4 d-flex justify-content-start justify-content-md-center align-items-center">
  16.                 {% if sub.icono_blanco %}
  17.                     <img class="icon mr-3 mr-md-2 mr-lg-3" src="{{ sub.icono_blanco }}" alt="{{ sub.nombre }}">
  18.                 {% endif %}
  19.                 <h4 class="mb-0">{{ sub.nombre }}</h4>
  20.                 <a href="{{ path('subcategoria_slug', {id_sub: sub.id,subcategoria: sub.slug, categoria_slug: slugcategoria }) }}" ></a>
  21.             </div>
  22.         </div>
  23.         {% endfor %}
  24.         
  25.     </div>
  26.     <div class="container">
  27.         <div class="row">
  28.             <div class="col-12 mt-5 d-md-none filtros-mobile">
  29.                 <div class="d-flex justify-content-between botonera-filtros">
  30.                     <button data-toggle="modal" data-target="#modal-filtro-principal" type="button" class="btn btn-naranja py-3 rounded-0 boton-singular dropdown-toggle"><i class="icon-filtro mr-2"></i><span>Filtros</span></button>
  31.                     <button data-toggle="modal" data-target="#modal-filtro-secundario" type="button" class="btn btn-naranja py-3 rounded-0 boton-singular dropdown-toggle"><i class="icon-filtro mr-2"></i><span>Otros filtros</span></button>
  32.                     {{ include ('basic/filtro-principal-mobile.html.twig') }} 
  33.                     {{ include ('basic/filtro-secundario-mobile.html.twig') }} 
  34.                 </div>
  35.             </div>
  36.             
  37.             <div class="col-12 col-md-4 col-xl-2 filtrar d-none d-md-block mt-3 mb-5">
  38.                 {{ include ('basic/filtros.html.twig') }}   
  39.             </div>
  40.             <div class="col-12 col-md-8 col-xl-10 my-5 px-xl-5">
  41.                 <div class="categ">
  42.                     {# MUESTRA TODOS LOS PRODUCTOS #}
  43.                     {% if productos %}
  44.                     {% for item in productos %}
  45.                     {% if item.visible %}
  46.                         <div class="item d-flex flex-column justify-content-between" data-orden="{{ item.orden }}">
  47.                             {% if principal %}
  48.                                 {% if principal and subcategoria != null %}
  49.                                     <a href="{{ path('producto_slug_subcategoria', {idproducto: item.plu, producto: item.slug, categoria: principal.slug, subcategoria: subcategoria.nombre}) }}">
  50.                                 {% else %}
  51.                                     <a href="{{ path('producto_slug_cat', {idproducto: item.plu, producto: item.slug, categoria: principal.slug}) }}">
  52.                                 {% endif %}
  53.                             {% else %}
  54.                             <a href="{{ path('producto_slug_subcat', {idproducto: item.plu, producto: item.slug}) }}">
  55.                             {% endif %}
  56.                                 <img src="{{ item.imagen ? item.imagen : qi.imagen('imagen-defecto-productos').image }}" alt="{{ item.alt }}" class="w-100"/>
  57.                             </a>
  58.                             <div class="d-flex flex-column justify-content-between body-producto">
  59.                                 <div>
  60.                                     <div class="d-flex justify-content-between">
  61.                                         <h4 class="color-negro w-75">{{ item.nombre }}</h4>
  62.                                         <i class="icon-fav" id="fav_prod{{ item.plu }}" data-id="{{ item.plu }}" data-user="{% if app.user %}1{% endif %}"></i>
  63.                                         <!-- <i class="icon-fav color-gris4" id="fav_prod{{ item.plu }}" data-id="{{ item.plu }}" data-user="{% if app.user %}1{% endif %}"></i> -->
  64.                                     </div>
  65.                                     {% if item.dctoic or item.incarrito == true %}
  66.                                     <p class="color-negro">${{ item.precio | number_format }}</p>
  67.                                     <p class="color-naranja">{{qi.texto('textoprom_incarrito')|raw}}</p>
  68.                                     {% else %}
  69.                                     <p class="color-negro">{% if idprincipal != 3 %}Desde{% endif %} ${{ item.precio | number_format }}</p>
  70.                                     {% endif %}
  71.                                 </div>
  72.                                 <div class="d-flex justify-content-between mt-3 button-cont">
  73.                                     {% if principal %}
  74.                                         {% if principal and subcategoria != null %}
  75.                                             <a href="{{ path('producto_slug_subcategoria', {idproducto: item.plu, producto: item.slug, categoria: principal.slug, subcategoria: subcategoria.nombre}) }}" class="btn btn-gris btn-item">Ver</a>
  76.                                         {% else %}
  77.                                             <a href="{{ path('producto_slug_cat', {idproducto: item.plu, producto: item.slug, categoria: principal.slug}) }}" class="btn btn-gris btn-item">Ver</a>
  78.                                         {% endif %}
  79.                                     {% else %}
  80.                                         <a href="{{ path('producto_slug_subcat', {idproducto: item.plu, producto: item.slug}) }}" class="btn btn-gris btn-item">Ver</a>
  81.                                     {% endif %}
  82.                                     {% if qi.getSetting('probar') == 1 %}
  83.                                         <a href="{{ qi.imagen('probar').link  }}" target="_blank" class="btn btn-naranja btn-item w-50">Probar</a>
  84.                                     {% endif %}
  85.                                 </div>
  86.                             </div>
  87.                         </div>
  88.                     {% endif %}
  89.                     {% endfor %}
  90.                     {% else %}
  91.                     <h4 class="color-amarillo">No hay productos en esa clasificación</h4>
  92.                     {% endif %}
  93.                 </div>
  94.             </div>
  95.         </div>
  96.     </div>
  97. {# banner #}
  98.     <div class="container-fluid">
  99.     {# banner_firmeza_porcategoria #}
  100.         {# el campo de esta imagen se llama banner_firmeza_porcategoria_mobile para mobile #}
  101.         <div class="row probar d-flex align-items-center" style="background-image: url('{{qi.imagen('banner_firmeza_porcategoria_desktop').image}}');">
  102.             <div class="col-12 col-xl-4">
  103.                 <h2 class="color-negro">{{qi.imagen('banner_firmeza_porcategoria_desktop').titulo}}</h2>
  104.                 <div>
  105.                     <button class="btn btn-naranja">{{qi.imagen('banner_firmeza_porcategoria_desktop').descripcion|raw}}</button>
  106.                 </div>
  107.             </div>
  108.             {% if qi.setting('animation_mano') == 1%}
  109.             <img class="mano" src="{{qi.imagen('animation_banner_firmeza_porcategoria').image}}" alt="">
  110.             {% endif %}
  111.         </div>
  112.     </div>
  113.     
  114. {% endblock %}
  115. {% block javascripts %}
  116.     <script>
  117.         $('.icon-fav').removeClass('active');
  118.         {% if app.user %}
  119.             {% for item in  qi.getFavoritoUser(app.user) %}
  120.                 $('#fav_prod{{ item.plu }}').addClass('active');
  121.             {% endfor %}
  122.         {% endif %}
  123.     </script>
  124. {% endblock %}