templates/base/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="es">
  3. <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <link rel="shortcut icon" type="image/x-icon" href="{{ asset('images/Iconos/estrella_Mesa1.png') }}" />
  7.     <link
  8.         href="https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap"
  9.         rel="stylesheet">
  10.     <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
  11.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.min.css') }}" />
  12.     <link rel="stylesheet" type="text/css" href="{{ asset('css/animate.css') }}" />
  13.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.min.css') }}" />
  14.     <link rel="stylesheet" type="text/css" href="{{ asset('css/chosen.min.css') }}" />
  15.     <link rel="stylesheet" type="text/css" href="{{ asset('css/font-awesome.min.css') }}" />
  16.     <link rel="stylesheet" type="text/css" href="{{ asset('css/pe-icon-7-stroke.css') }}" />
  17.     <link rel="stylesheet" type="text/css" href="{{ asset('css/jquery.scrollbar.css') }}" />
  18.     <link rel="stylesheet" type="text/css" href="{{ asset('css/lightbox.min.css') }}" />
  19.     <link rel="stylesheet" type="text/css" href="{{ asset('css/magnific-popup.css') }}" />
  20.     <link rel="stylesheet" type="text/css" href="{{ asset('css/slick.min.css') }}" />
  21.     <link rel="stylesheet" type="text/css" href="{{ asset('fonts/flaticon.css') }}" />
  22.     <link rel="stylesheet" type="text/css" href="{{ asset('css/megamenu.css') }}" />
  23.     <link rel="stylesheet" type="text/css" href="{{ asset('css/dreaming-attribute.css') }}" />
  24.     <link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}" />
  25.     <title>{% block title %}Los Vascos | Tienda Online{% endblock %}</title>
  26.     {% block stylesheets %}{% endblock %}
  27. </head>
  28. <body>
  29.     
  30.     {% block body %}{% endblock %}
  31.     
  32.     <script src="{{ asset('js/jquery-1.12.4.min.js') }}"></script>
  33.     <script src="{{ asset('js/bootstrap.min.js') }}"></script>
  34.     <script src="{{ asset('js/chosen.min.js') }}"></script>
  35.     <script src="{{ asset('js/countdown.min.js') }}"></script>
  36.     <script src="{{ asset('js/jquery.scrollbar.min.js') }}"></script>
  37.     <script src="{{ asset('js/lightbox.min.js') }}"></script>
  38.     <script src="{{ asset('js/magnific-popup.min.js') }}"></script>
  39.     <script src="{{ asset('js/slick.js') }}"></script>
  40.     <script src="{{ asset('js/jquery.zoom.min.js') }}"></script>
  41.     <script src="{{ asset('js/threesixty.min.js') }}"></script>
  42.     <script src="{{ asset('js/jquery-ui.min.js') }}"></script>  
  43.     <script src="{{ asset('js/mobilemenu.js') }}"></script>
  44.     <script src='https://maps.googleapis.com/maps/api/js?key=AIzaSyC3nDHy1dARR-Pa_2jjPCjvsOR4bcILYsM'></script>
  45.     <script src="{{ asset('js/functions.js') }}"></script>
  46.     <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
  47.     <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  48.     {% block javascripts %}{% endblock %}
  49.     <script>
  50.         $( document ).ready(function() {
  51.             
  52.             if("{{app.session.get('cartId')}}"){
  53.                 console.log("here");
  54.                 $.ajax({
  55.                     type: 'GET',
  56.                     url: '{{path('currentItems')}}',
  57.                     dataType: "json",
  58.                     beforeSend: function(){
  59.                     },
  60.                     success: function(response){
  61.                         var formatter = new Intl.NumberFormat('es-CL', {
  62.                             style: 'currency',
  63.                             currency: 'CLP',
  64.                             // These options are needed to round to whole numbers if that's what you want.
  65.                             minimumFractionDigits: 0,
  66.                             maximumFractionDigits: 0,
  67.                         });
  68.                         console.log(response);
  69.                         //$(".cart-count").text(response.products_sales.length + response.bookings.length );
  70.                         $(".minicart-number-items").text(response.products_sales.length);                        
  71.                         $("#cart-count").text(response.products_sales.length);
  72.                         $("#cart-count2").text(response.products_sales.length);
  73.                
  74.                         response.products_sales.forEach(element => {
  75.                             $("#shopping-cart").append(`
  76.                                 <li class="kreen-mini-cart-item mini_cart_item MejMedium">
  77.                                     <a href="#" onclick="eliminarProductoCarrito(`+element.sale_id+`)" class="remove remove_from_cart_button">×</a>
  78.                                     <a href="#">
  79.                                         <img src="`+element.product_image+`"
  80.                                             class="attachment-kreen_thumbnail size-kreen_thumbnail"
  81.                                             alt="img" width="600" height="778">`+element.product_name+`
  82.                                     </a>
  83.                                     <span class="quantity">`+element.quantity +` × <span
  84.                                             class="kreen-Price-amount amount"><span
  85.                                                 class="kreen-Price-currencySymbol">$</span>`+formatter.format(element.original_price).replace(/^(\D+)/, '')+`</span>
  86.                                 </li>
  87.                             `);
  88.                              $("#shopping-cart2").append(`
  89.                                 <li class="kreen-mini-cart-item mini_cart_item">
  90.                                     <a href="#" onclick="eliminarProductoCarrito(`+element.sale_id+`)" style="margin-top: 30px!important;" class="remove  remove_from_cart_button">×</a>
  91.                                     <a href="#">
  92.                                         <img src="`+element.product_image+`"
  93.                                             class="attachment-kreen_thumbnail size-kreen_thumbnail"
  94.                                             alt="img" width="600" height="778">`+element.product_name+`
  95.                                     </a>
  96.                                     <span class="quantity">`+element.quantity +` × <span
  97.                                             class="kreen-Price-amount amount"><span
  98.                                                 class="kreen-Price-currencySymbol">$</span>`+formatter.format(element.original_price).replace(/^(\D+)/, '')+`</span>
  99.                                 </li>
  100.                             `);
  101.                         });
  102.                         if(response.tarifa_monto_min <= response.total_price){                            
  103.                             $('#comprar1').show();
  104.                             $('#comprar2').show();
  105.                         }else{
  106.                             $('#comprar1').hide();
  107.                             $('#comprar2').hide();
  108.                         }
  109.                         console.log(response);
  110.                         $("#cart-total").text("$"+formatter.format(response.total_price).replace(/^(\D+)/, ''));
  111.                         $("#cart-total2").text("$"+formatter.format(response.total_price).replace(/^(\D+)/, ''));                        
  112.                         $("#cart-subtotal").text("$"+formatter.format(response.subtotal).replace(/^(\D+)/, ''));
  113.                         $("#cart-subtotal2").text("$"+formatter.format(response.subtotal).replace(/^(\D+)/, ''));
  114.                         $("#cart-descuento").text("$"+formatter.format(response.total_discount).replace(/^(\D+)/, ''));
  115.                         $("#cart-descuento2").text("$"+formatter.format(response.total_discount).replace(/^(\D+)/, ''));
  116.                     }
  117.                 });
  118.             }
  119.         });
  120.          $('#full-carrito').hide();
  121.          $('#full-carrito2').hide();
  122.         function eliminarProductoCarrito(id_producto) {
  123.             parametros = {'saleId': id_producto, 'code': $('#codigoCupon').val()}
  124.             url = Routing.generate('deleteFromCart', parametros);
  125.             location.href = url;
  126.         }
  127.     </script>
  128. </body>
  129. </html>