templates/basic/product.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block seo %}
  3.   {% set ruta = app.request.get('_route') %}
  4.   {% set params = app.request.attributes.get('_route_params')  %}
  5.   
  6.   <title>{{ product.TituloSeo }}</title>
  7.   <meta name="description" content="{{ product.DescripcionSeo }}" />
  8.   <link rel="image_src" href="{{ product.imagen }}"/>
  9.   <meta property="og:title" content="{{ product.nombre }}" />
  10.   <meta property="og:type" content="article" />
  11.   <meta property="og:url" content="{{ url(ruta,params) }}" />
  12.   <meta property="og:image" content="{{ product.imagen }}" />
  13.   <meta property="og:description" content="{{ product.DescripcionSeo }}" />
  14. {% endblock %}
  15. {% block body %}
  16. {{ include('basic/canales.html.twig') }}
  17. <section class="product">
  18.   <div class="container">    
  19.     <div class="row">
  20.       <div class="col-12 col-md-6 col-xl-7">
  21.         <div class="swiper mySwiper2 position-relative">
  22.           <div class="swiper-wrapper">
  23.             
  24.             {% for item in imgsprod %}
  25.             <div class="swiper-slide">
  26.               <img class="img-pro zoom" src="{{ item.image }}" />
  27.             </div>
  28.             {% endfor %}
  29.           </div>
  30.           <div class="swiper-button-next" aria-disabled="false">
  31.             <img src="/img/SVG/right.svg"/>
  32.           </div>
  33.           <div class="swiper-button-prev" aria-disabled="false">
  34.             <img src="/img/SVG/left.svg"/>
  35.           </div>
  36.         </div>
  37.         <div thumbsSlider="" class="swiper mySwiper">
  38.           <div class="swiper-wrapper">
  39.            {% for item in imgsprod %}
  40.             <div class="swiper-slide">
  41.               <img class="w-100" src="{{ item.image }}" />
  42.             </div>
  43.             {% endfor %}
  44.           </div>
  45.         </div>        
  46.       </div>
  47.       {# informacion del producto #}
  48.       <div class="col-12 col-md-6 col-xl-5">
  49.         {# escritorio #}
  50.         <div class="info-product only-desk mb-4">
  51.           
  52.           <div class="d-flex justify-content-between">
  53.             <h1 class="color-negro">{{ product.nombre }} 
  54.             {% if product.rotulo %}
  55.               {% if product.rotulo.nombre %}
  56.               <span class="etiqueta-nombre-producto py-1 px-3 bg-gris3 rounded-pill">{{  product.rotulo.nombre }}</span>
  57.               {% endif %}
  58.               {% if product.rotulo.imagen %}
  59.               <img src ="{{ product.rotulo.imagen }}" class="etiqueta-nombre-producto py-1 px-3 bg-gris3 rounded-pill"></img>
  60.               {% endif %}
  61.             {% endif%}
  62.             </h1>
  63.             {# <i class="icon-fav color-gris4" id="fav_prod{{ principal_padre['plu'] }}" data-id="{{ principal_padre['plu'] }}" data-user="{% if app.user %}1{% endif %}"></i> #}
  64.                             <i class="icon-fav color-gris4" id="fav_prod{{ product.plu }}" data-id="{{ product.plu }}" data-user="{% if app.user %}1{% endif %}"></i>
  65.           </div>
  66.           <div class="titulos-producto">
  67.           {% if lista %}
  68.             {% if lista.precioSinDescuento != lista.precio %}
  69.               {% if product.dctoic %}
  70.                   <h2 class="mr-2 mb-0 color-naranja">${{ lista.precio | number_format }}</h2>
  71.                   <p class="color-naranja">{{qi.texto('textoprom_incarrito')|raw}}</p>
  72.               {% else %}
  73.                 <h3 class="medium mb-0 mr-2" style="text-decoration: line-through;">
  74.                     ${{ lista.precioSinDescuento | number_format }}
  75.                 </h3>
  76.               {% endif %}
  77.             {% endif %}
  78.               {% if product.dctoic %}
  79.                   <h2 class="mr-2 mb-0 color-naranja">${{ lista.precio | number_format }}</h2>
  80.                   <p class="color-naranja">{{qi.texto('textoprom_incarrito')|raw}}</p>
  81.               {% else %}
  82.               <h2 class="mr-2 mb-0 color-naranja">${{ lista.precio | number_format }}</h2>
  83.             {% if lista.precioSinDescuento != lista.precio %}
  84.               <h6 class="sm-bold mb-0">Ahorras ${{ (lista.precioSinDescuento - lista.precio) | number_format }}</h6>
  85.             {% endif %} 
  86.             {% endif %}           
  87.           {% else %}
  88.               {% if product.dctoic %}
  89.                 <h2 class="mr-2 mb-0 color-naranja">${{ lista.precio | number_format }}</h2>
  90.                 <p class="color-naranja">{{qi.texto('textoprom_incarrito')|raw}}</p>
  91.               {% else %}
  92.                 <h2 class="mr-2 mb-0 color-naranja">${{ product.precio | number_format }}</h2>
  93.               {% endif %}
  94.           {% endif %}
  95.           </div>
  96.           <p class="color-gris1">Disponible para fabricación</p>
  97.           <ul class="opciones mt-4">
  98.             <li id="descripcion" class="active">Descripción </li>
  99.             {# <li id="materiales">Materiales</li> #}
  100.             <li id="entrega">Tiempos de entrega</li>
  101.             <li id="ficha">Ficha técnica</li>
  102.           </ul>
  103.           <div class="py-2 descripcion inf">
  104.             <div class="cont-info">
  105.               <p class="sm">{{ product.descripcion | raw }}</p>
  106.               <h4>Material:</h4>
  107.               <p>{{ materialproduct }} </p>
  108.               <h4>Tipología:</h4> 
  109.               <p>{{ product.tipologia }}</p>  
  110.               {# cambio en el selec de las medidas #}
  111.               <h4>Medidas</h4>
  112.               <div class="tam">
  113.                 {% for item in medidas %}
  114.                   {% if item.nombremed %}
  115.                     <a href="{{ path('product_medida', {id: item.plu, nombre: qi.slugify(item.nombremed), medida: qi.slugifyMedida(item.nombremed) }) }}" id="tam_{{item.idmed}}"
  116.                        class="btn-med {% if medidaroute %}{% if medidaroute == qi.slugify(item.nombremed) %}active{% endif %}{% endif %}
  117.                       {% if medidaroute == null %}
  118.                         {% if item.nombremed == product.medida %}active{% endif %}
  119.                       {% endif %}">
  120.                       {{ item.nombremed }}</a>
  121.                   {% endif %}
  122.                 {% endfor %}
  123.               </div>
  124.             </div>
  125.           </div>
  126.           {# tiempos de entrega #}
  127.           <div class="py-2 entrega inf mb-2 mb-md-4">
  128.             <div class="cont-info">
  129.               <p class="sm">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p>
  130.               <h6 class="bold pt-4">Precio y tiempos de entrega para productos inferiores a
  131.                 $300.000
  132.               </h6>
  133.               <table class="w-100">
  134.                 <tbody>
  135.                   <tr>
  136.                     <td class="ciudad"><p class="sm">Bogotá</p></td>
  137.                     <td class="tiempo"><p class="sm">6 días hab</p></td>
  138.                     <td class="valor"><p class="sm">$10.000</p></td>
  139.                   </tr>
  140.                   <tr>
  141.                     <td class="ciudad"><p class="sm">Medellín</p></td>
  142.                     <td class="tiempo"><p class="sm">6 días hab</p></td>
  143.                     <td class="valor"><p class="sm">$10.000</p></td>
  144.                   </tr>
  145.                   <tr>
  146.                     <td class="ciudad"><p class="sm">Cali</p></td>
  147.                     <td class="tiempo"><p class="sm">6 días hab</p></td>
  148.                     <td class="valor"><p class="sm">$10.000</p></td>
  149.                   </tr>
  150.                   <tr>
  151.                     <td class="ciudad"><p class="sm">Barranquilla</p></td>
  152.                     <td class="tiempo"><p class="sm">6 días hab</p></td>
  153.                     <td class="valor"><p class="sm">$10.000</p></td>
  154.                   </tr>
  155.                   <tr>
  156.                     <td class="ciudad"><p class="sm">Bucaramanga</p></td>
  157.                     <td class="tiempo"><p class="sm">6 días hab</p></td>
  158.                     <td class="valor"><p class="sm">$10.000</p></td>
  159.                   </tr>
  160.                 </tbody>
  161.               </table>
  162.             </div>
  163.           </div>
  164.           {# ficha tecnica #}
  165.           <div class="py-2 ficha inf">
  166.             <div class="cont-info w-100">
  167.             {{ include('basic/fichatecnica.html.twig') }}
  168.             </div>
  169.           </div>
  170.           <div class="w-75 mx-auto">
  171.             <img src="{{ product.imagenFirmeza }}" alt="">
  172.           </div>
  173.         </div>
  174.         {# mobile #}
  175.         <div class="only-mobile info-product">
  176.           <div class="d-flex justify-content-between">
  177.             <h1 class="color-negro">{{product.nombre}}</h1>
  178.                             <i class="icon-fav color-gris4" id="fav_prod{{ product.plu }}" data-id="{{ product.plu }}" data-user="{% if app.user %}1{% endif %}"></i>
  179.             {# <i class="icon-fav color-gris4"></i> #}
  180.           </div>
  181.           <div class="d-flex">
  182.           {% if lista %}
  183.             {% if lista.precioSinDescuento != lista.precio %}
  184.               <h3 class="medium mb-0 mr-2" style="text-decoration: line-through;">
  185.                   ${{ lista.precioSinDescuento | number_format }}
  186.               </h3>
  187.             {% endif %}
  188.               <h2 class="mr-2 mb-0 color-naranja">${{ lista.precio | number_format }}</h2>
  189.             {% if lista.precioSinDescuento != lista.precio %}
  190.               <h6 class="sm-bold mb-0">Ahorras ${{ (lista.precioSinDescuento - lista.precio) | number_format }}</h6>
  191.             {% endif %}
  192.           {% else %}
  193.                 <h2 class="mr-2 mb-0 color-naranja">${{ product.precio | number_format }}</h2>
  194.           {% endif %}
  195.           </div> 
  196.           <div class="row w-100">
  197.             <h4>Medidas</h4>
  198.             <div class="tam">
  199.               {% for item in medidas %}
  200.                 {% if item.nombremed %}
  201.                   <a href="{{ path('product_medida', {id: item.plu, nombre: qi.slugify(item.nombremed), medida: qi.slugifyMedida(item.nombremed) }) }}" id="tam_{{item.idmed}}" class="btn-med {% if medidaroute %}{% if medidaroute == qi.slugify(item.nombremed) %}active{% endif %}{% endif %} {% if medidaroute == null %}{% if item.nombremed == "Sencillo 100 x 190" %}active{% endif %}{% endif %}">{{ item.nombremed }}</a>
  202.                 {% endif %}
  203.               {% endfor %}
  204.             </div>
  205.           </div>
  206.         </div>
  207.         {# boton añadir #}
  208.         <div class="container">
  209.           <div class="d-flex">
  210.             <div class="cant d-flex">
  211.               <button class="color-naranja inumber-decrement_input">-</button>
  212.               <input class="color-negro" id="cant_{{ product.id }}" type="text" value="1">
  213.               <button class="color-naranja inumber-increment_input">+</button>
  214.             </div>
  215.             <button class="btn btn-naranja ml-3 openCar agregar" data-id="{{ product.plu }}"><i class="icon-carrito color-blanco mr-1"></i>Añadir</button>
  216.           </div> 
  217.         </div>
  218.         {# mobile #}
  219.         <div class="only-mobile info-product mt-4">
  220.           <div class="accordion" id="accordionExample">
  221.             <div class="card">
  222.               <div class="card-header" id="headingOne">
  223.                 <h2 class="mb-0">
  224.                   <button class="btn btn-block collapsed text-left color-gris1" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
  225.                     Descripción
  226.                   </button>
  227.                 </h2>
  228.               </div>
  229.               <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
  230.                 <div class="card-body p-2">
  231.                   <div class="descripcion inf">
  232.                     <div class="cont-info">
  233.                       {{ product.descripcion | raw }}
  234.                     </div>
  235.                   </div>
  236.                 </div>
  237.                 <div class="p-2">
  238.                   <h4>Material:</h4> 
  239.                   <p>{{ materialproduct }}</p>
  240.                   <h4>Tipología:</h4> 
  241.                   <p>{{ product.tipologia }}</p>  
  242.                 </div>
  243.               </div>
  244.             </div>
  245.             <div class="card">
  246.               <div class="card-header" id="headingTwo">
  247.                 <h2 class="mb-0">
  248.                   <button class="btn btn-block text-left collapsed color-gris1" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
  249.                     Materiales
  250.                   </button>
  251.                 </h2>
  252.               </div>
  253.               <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
  254.                 <div class="card-body p-2">
  255.                   <div class="materiales inf">
  256.                     <div class="cont-info">
  257.                         {{ materialproduct }}
  258.                     </div>
  259.                   </div>
  260.                 </div>
  261.               </div>
  262.             </div>
  263.             {# tiempos de entrega #}
  264.             <div class="card">
  265.               <div class="card-header" id="headingThree">
  266.                 <h2 class="mb-0">
  267.                   <button class="btn  btn-block text-left collapsed color-gris1" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
  268.                     Tiempos de entrega
  269.                   </button>
  270.                 </h2>
  271.               </div>
  272.               <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
  273.                 <div class="card-body p-2">
  274.                   <div class="entrega inf">
  275.                     <div class="cont-info">
  276.                       <p class="sm">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p>
  277.                       <h6 class="bold pt-4">Precio y tiempos de entrega para productos inferiores a
  278.                         $300.000
  279.                       </h6>
  280.                       <table class="w-100">
  281.                         <tbody>
  282.                           <tr>
  283.                             <td class="ciudad"><p class="sm">Bogotá</p></td>
  284.                             <td class="tiempo"><p class="sm">6 días hab</p></td>
  285.                             <td class="valor"><p class="sm">$10.000</p></td>
  286.                           </tr>
  287.                           <tr>
  288.                             <td class="ciudad"><p class="sm">Medellín</p></td>
  289.                             <td class="tiempo"><p class="sm">6 días hab</p></td>
  290.                             <td class="valor"><p class="sm">$10.000</p></td>
  291.                           </tr>
  292.                           <tr>
  293.                             <td class="ciudad"><p class="sm">Cali</p></td>
  294.                             <td class="tiempo"><p class="sm">6 días hab</p></td>
  295.                             <td class="valor"><p class="sm">$10.000</p></td>
  296.                           </tr>
  297.                           <tr>
  298.                             <td class="ciudad"><p class="sm">Barranquilla</p></td>
  299.                             <td class="tiempo"><p class="sm">6 días hab</p></td>
  300.                             <td class="valor"><p class="sm">$10.000</p></td>
  301.                           </tr>
  302.                           <tr>
  303.                             <td class="ciudad"><p class="sm">Bucaramanga</p></td>
  304.                             <td class="tiempo"><p class="sm">6 días hab</p></td>
  305.                             <td class="valor"><p class="sm">$10.000</p></td>
  306.                           </tr>
  307.                         </tbody>
  308.                       </table>
  309.                     </div>
  310.                   </div>
  311.                 </div>
  312.               </div>
  313.             </div>
  314.             <div class="card">
  315.               <div class="card-header" id="headingFourth">
  316.                 <h2 class="mb-0">
  317.                   <button class="btn btn-block text-left collapsed color-gris1" type="button" data-toggle="collapse" data-target="#collapseFourth" aria-expanded="false" aria-controls="collapseFourth">
  318.                     Ficha técnica
  319.                   </button>
  320.                 </h2>
  321.               </div>
  322.               <div id="collapseFourth" class="collapse" aria-labelledby="headingFourth" data-parent="#accordionExample">
  323.                 <div class="card-body p-2">
  324.                   <div class="ficha inf">
  325.                     <div class="cont-info">
  326.                     {{ include('basic/fichatecnica.html.twig') }}
  327.                     </div>
  328.                   </div>
  329.                 </div>
  330.               </div>
  331.             </div>
  332.           </div>
  333.           </div>
  334.         </div>        
  335.       </div>
  336.     </div>
  337.   </div>
  338. </section>
  339. {# productos relacionados #}
  340. {% if relacionados|length > 0 %}
  341. <!-- <section class="my-5 text-center">
  342.   <div class="container">
  343.     <div class="swiper-container swiper-prueba">
  344.       <div class="swiper-wrapper">
  345.         {% for i in 1..20 %}
  346.           <div class="swiper-slide">
  347.             <div class="singular-control">
  348.               <p class="mb-0">Control {{i}}</p>
  349.             </div>
  350.           </div>
  351.         {% endfor %}
  352.       </div>
  353.       <div class="swiper-button-next" aria-disabled="false">
  354.         <img src="/img/SVG/right.svg"/>
  355.       </div>
  356.       <div class="swiper-button-prev" aria-disabled="false">
  357.         <img src="/img/SVG/left.svg"/>
  358.       </div>
  359.     </div>
  360.   </div>
  361. </section> -->
  362. <section class="complementarios">
  363.   <div class="container">
  364.     <div class="row">
  365.         <div class="col-sm-5">
  366.           <div class="container">
  367.               <h2 class="color-naranja mt-4">{{qi.texto('complementatucompra_titulo')|raw}}</h2>
  368.               <p class="color-gris1 mt-3">{{qi.texto('complementatucompra')|raw}}</p>
  369.           </div>
  370.         </div>
  371.         <div class="col-sm-7">
  372.           <div class="container">
  373.             <div class="swiper-container complementarios-rotador">
  374.               <div class="swiper-wrapper">
  375.                   {% for item in relacionados %}
  376.                     <div class="swiper-slide">
  377.                         <div class="item-complementario">
  378.                           <a class="img" href="{{ path('product', {id: item.plu, nombre: qi.slugify(item.nombre)}) }}">
  379.                             <img src="{{ item.imagen }}" alt="{{ item.alt }}">
  380.                           </a>                       
  381.                           <h4 class="medium">{{ item.nombre}}</h4>
  382.                           {% if item.medida %}
  383.                             <p class="mb-2 d-none d-xl-block">{{ item.medida}}</p>
  384.                           {% endif %}
  385.                           <p class="mb-2 d-none d-xl-block">{{ item.precio | number_format}}</p>                                 
  386.                           <button class="btn btn-naranja agregarcomplementario" data-id="{{ item.plu }}"><a href="#">Agregar</a></button>
  387.                         </div>
  388.                     </div>
  389.                   {% endfor %}
  390.                 </div>
  391.               </div>
  392.           </div>
  393.             <div class="swiper-button-next" aria-disabled="false">
  394.               <img src="/img/SVG/right.svg">
  395.             </div>
  396.             <div class="swiper-button-prev" aria-disabled="false">
  397.               <img src="/img/SVG/left.svg">
  398.             </div>
  399.             <div class="swiper-pagination"></div>
  400.           </div>
  401.         </div>
  402.     </div>
  403.   </div>
  404. </section>
  405. {% endif %}
  406. {# BENEFICIOS #}
  407. <section class="otros pt-5">
  408.   <div class="container">
  409.     <div class="w-100 d-flex justify-content-center">
  410.       <img class="relax-img" src="{{ principal_padre.imagen_beneficios }}" alt="">
  411.     </div>
  412.     <div class="row w-100">
  413.         {% for item in principal_padre.beneficios %}
  414.           <div class="col-sm-4">
  415.             <div>
  416.               <img src="{{ item.icono }}" alt="">
  417.             </div>
  418.             <div>
  419.               <h6 class="sm-bold color-negro">{{ item.nombre }}</h6>
  420.               <p class="sm">{{ item.resumen }}</p>
  421.             </div>
  422.           </div>
  423.         {% endfor %}
  424.     </div>
  425.   </div>
  426. </section>
  427. <!-- <div class="swiper-control-firmeza d-flex justify-content-between align-items-center px-2 px-md-0"> -->
  428. <div class="swiper-control-firmeza px-2 px-md-0">
  429.   <div class="swiper content-wrapper swiper-container">
  430.     <div class="swiper-wrapper justify-content-xl-center">
  431.       {% for subcat in subcategorias %}
  432.         {% if subcat.descripcion %}
  433.           {% if vieneconsubcategoria != null %}
  434.           <div class="swiper-slide px-5 px-md-0 {% if subcat.id == idsub %} swiper-slide-active {% endif %} {% if loop.index == 2 %} swiper-slide-next {% endif %}" style="width: 398px;">
  435.             <div class="opcion opciones px-2 px-md-3 px-lg-2 py-3 py-md-4 d-flex justify-content-center align-items-center {% if subcat.id == idsub %}active{% endif %}" data-id="{{subcat.id}}">
  436.           {% else %}
  437.           <div  class="swiper-slide px-5 px-md-0 {% if loop.index == 1 %} swiper-slide-active {% endif %} {% if loop.index == 2 %} swiper-slide-next {% endif %}" style="width: 398px;">
  438.             <div class="opcion opciones px-2 px-md-3 px-lg-2 py-3 py-md-4 d-flex justify-content-center align-items-center {% if loop.index == 1 %} active {% endif %}" data-id="{{subcat.id}}">
  439.           {% endif %}
  440.                 <img class="icon mr-3 mr-md-2 mr-lg-3" src="{{subcat.icono_blanco}}" alt="">
  441.                 <h4 class="mb-0">{{subcat.nombre}}</h4>
  442.             </div>
  443.           </div>
  444.         {% endif %}
  445.       {% endfor %}
  446.     </div>
  447.     <div class="swiper-button-prev d-xl-none" aria-disabled="false">
  448.       <img src="/img/SVG/left.svg">
  449.     </div>         
  450.     <div class="swiper-button-next d-xl-none" aria-disabled="false">
  451.       <img src="/img/SVG/right.svg">
  452.     </div>
  453.     <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>                   
  454.   </div>
  455. </div>
  456. <div class="container">    
  457.   <div class="secciones mt-4">
  458.     {% for subcat in subcategorias %}
  459.       {% if subcat.descripcion %}          
  460.           <div class="opciones-container" id="sub_{{subcat.id}}">
  461.             <div class="container">
  462.               <div class="row">
  463.                 <div class="col-12 col-lg-5 info-opciones">
  464.                   <div class="container pt-xl-5">
  465.                     <h1 class="color-negro">{{subcat.nombre}}</h1>
  466.                     {{subcat.descripcion|raw}}
  467.                     <div class="d-flex align-items-center mt-5">
  468.                       {% if subcat.avatar == 1 %}
  469.                       <a href="https://colchonperfecto.romancerelax.com/">
  470.                         <button class="btn btn-naranja mr-2">Pruébalo en Avatar.</button>
  471.                       </a>
  472.                       {% endif %}
  473.                       <a href="{{ path('subcategoria_slug', {subcategoria: subcat.slug, categoria_slug: slugcat }) }}">
  474.                         <button class="btn btn-naranja">Ver productos</button>
  475.                       </a>
  476.                     </div>
  477.                   </div>
  478.                 </div>
  479.                 {% if subcat.idyoutube %}
  480.                   <div class="col-12 col-lg-7 img-opciones mt-5"><iframe width="560" height="315" src="https://www.youtube.com/embed/{{subcat.idyoutube}}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
  481.                 {% else %}
  482.                   <div class="col-12 col-lg-7 img-opciones mt-5" style="background-image: url('{{subcat.imagen}}');"></div>
  483.                 {% endif %}
  484.               </div>
  485.             </div>
  486.           </div>
  487.       {% endif %}      
  488.     {% endfor %}                
  489.   </div>
  490. </div>
  491. {# video #}
  492. {% if principal_padre.video %}
  493.     <section class="py-4">
  494.         <div class="container">
  495.             <iframe src="https://www.youtube.com/embed/{{ qi.getIdVideoYt(principal_padre.video) }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  496.         </div>
  497.     </section>
  498. {% endif %}
  499. {# banner de tipos de tecnologia en colchones #}
  500. <section class="colchon-partes">
  501.   {% if principal_padre.detalles or  principal_padre.imagen_puntos or principal_padre.gif_puntos or principal_padre.imagen_puntos %}
  502.   <div class="container piezas py-5">
  503.       {% if principal_padre.detalles %}
  504.       <h2 class="text-center color-blanco">Tecnología</h2>
  505.       <p class="color-blanco texto">{{principal_padre.detalles|raw}}</p>
  506.       {% endif %}
  507.       <div class="cont_int" style="position: relative;display: inline-block">
  508.       <img class="img-ppal" id="img_inter" src="{{ principal_padre.imagen_puntos }}" data-gif="{{ principal_padre.gif_puntos }}" data-ini="{{ principal_padre.imagen_puntos }}" alt="" style="width: 100%">
  509.       {% for item in principal_padre.puntos %}
  510.         <a class="bubble" style="display:none;bottom: {{ (100 - item.y*100) }}%; left: {{ (item.x*100) }}%;" href="#" data-toggle="tooltip" data-placement="{{ item.direccion }}"  title="
  511.         <div>
  512.         <h6 class='bold color-azul'>{{ item.titulo }}</h6>
  513.         <p class='color-blanco'>{{ item.resumen}}</p>
  514.         </div>">
  515.           <div><img src="/img/{{ item.numero }}-12.png" alt=""></div>
  516.         </a>
  517.       {% endfor %}
  518.     </div>
  519.   </div>
  520.   {% endif %}
  521. </section>
  522. {% if principal_padre.calidad or principal_padre.responsabilidad or principal_padre.tecnologia %}
  523.   <section class="rotador">
  524.     <div class="container d-flex justify-content-between align-items-center">
  525.         <div class="swiper-button-prev">
  526.           <img src="/img/SVG/left.svg"/>
  527.         </div>
  528.         <div class="swiper-container slider-temas">
  529.           <div class="swiper-wrapper">
  530.             {% if principal_padre.calidad %}
  531.             <div class="swiper-slide">
  532.               <div class="container">
  533.                 <div class="row">
  534.                 <div class="col-sm-6 img-box" style="background-image: url('{{principal_padre.imgcalidad}}');">&nbsp;</div>
  535.                   <div class="col-sm-6 bg-rosa-palo">
  536.                     <div class="pt-3">
  537.                       <h2 class="color-negro">{{ principal_padre.calidad | raw }}</h2>
  538.                     </div>  
  539.                   </div>
  540.                 </div>
  541.               </div>
  542.             </div>
  543.             {% endif %}
  544.             {% if principal_padre.responsabilidad %}
  545.             <div class="swiper-slide">
  546.               <div class="container">
  547.                 <div class="row">
  548.                 <div class="col-sm-6 img-box" style="background-image: url('{{principal_padre.imgresponsabilidad}}');">&nbsp;</div>
  549.                   <div class="col-sm-6 bg-rosa-palo">
  550.                     <div class="pt-3">
  551.                       <h2 class="color-negro">{{ principal_padre.responsabilidad | raw }}</h2>
  552.                     </div>  
  553.                   </div>                
  554.                 </div>
  555.               </div>
  556.             </div>
  557.             {% endif %}
  558.             {% if principal_padre.tecnologia %}
  559.             <div class="swiper-slide">
  560.               <div class="container">
  561.                 <div class="row">
  562.                 <div class="col-sm-6 img-box" style="background-image: url('{{principal_padre.imgtecnologia}}');">&nbsp;</div>
  563.                   <div class="col-sm-6 bg-rosa-palo">
  564.                     <div class="pt-3">
  565.                       <h2 class="color-negro">{{ principal_padre.tecnologia | raw }}</h2>
  566.                     </div>  
  567.                   </div>                                 
  568.                 </div>
  569.               </div>
  570.             </div>
  571.             {% endif %}
  572.           </div>
  573.         </div>
  574.         <div class="swiper-button-next">
  575.           <img src="/img/SVG/right.svg"/>
  576.         </div>
  577.     </div>
  578.   </section>
  579. {% endif %}
  580. {# fin del banner de tipos de tecnologia en colchones #}
  581. {# banner de necesitas ayuda #}
  582. {{ include('basic/necesitas-ayuda.html.twig') }}
  583. {# para mostrar que producto agregado #}
  584. <div id="snackbar">Producto agregado</div>
  585.   <script type="text/javascript">
  586.       function preloadImage(url)
  587.       {
  588.           var img=new Image();
  589.           img.src=url;
  590.       }
  591.       preloadImage('{{ principal_padre.gif_puntos }}')
  592.   </script>
  593. {% endblock %}
  594. {% block javascripts %}
  595. {# codigo js #}
  596. <script>
  597.   $('.icon-fav').removeClass('active');
  598.   {% if app.user %}
  599.     {% for item in  qi.getFavoritoUser(app.user) %}
  600.       $('#fav_prod{{ item.plu }}').addClass('active');
  601.     {% endfor %}
  602.   {% endif %}
  603.   $(document).ready(function (){
  604.     {# gtag('event', 'view_item', {
  605.         "items": [
  606.             {
  607.                 "id": "{{ principal_padre.plu }}",
  608.                 "name": "{{ principal_padre.nombre }}",
  609.                 "price": "{{ principal_padre.precio }}"
  610.             }
  611.         ]
  612.     }); #}
  613.     {% if vieneconsubcategoria != null %}
  614.       $('.opciones-container').hide();
  615.       $('#sub_{{ idsub }}').fadeIn();
  616.     {% endif %}
  617.   })
  618. </script>
  619. {% endblock %}