<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Frontend/base.html.twig */
class __TwigTemplate_9b92d7b5b69ab61e11086b3588c7d29c extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'css' => [$this, 'block_css'],
'extra_head' => [$this, 'block_extra_head'],
'body' => [$this, 'block_body'],
'script' => [$this, 'block_script'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Frontend/base.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Frontend/base.html.twig"));
// line 1
echo "<!doctype html>
<html lang=\"en\">
<head>
<!-- Required meta tags -->
<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
<meta name=\"description\" content=\"Tu tienda online fácil y rápido\">
<!--meta name=\"keywords\" content=\"tienda online, app, ecommerce, website\"-->
<!-- Font -->
<link rel=\"dns-prefetch\" href=\"http://fonts.googleapis.com\">
\t\t<link href=\"https://fonts.googleapis.com/css?family=Montserrat:400,700|Playfair+Display:400,700|Poppins:200,300,400,400i,500,700&display=swap\" rel=\"stylesheet\">
<link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\">
<!-- Bootstrap CSS -->
<link rel=\"stylesheet\" href=\"";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/css/bootstrap4.min.css"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css\">
<link rel=\"stylesheet\" href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/animate/animate.css"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/dattaAble/assets/css/pages/pnotify.css"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/css-hamburgers/hamburgers.min.css"), "html", null, true);
echo "\">
<link href=\"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css\" rel=\"stylesheet\">
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 22
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/animsition/css/animsition.min.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/select2/select2.min.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->\t
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 26
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker3.min.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 28
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/slick/slick.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 30
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/MagnificPopup/magnific-popup.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 32
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/perfect-scrollbar/perfect-scrollbar.css"), "html", null, true);
echo "\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/util.css"), "html", null, true);
echo "\">\t
\t<!--===============================================================================================-->\t
<link rel=\"stylesheet\" href=\"";
// line 36
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/dattaAble/assets/plugins/material-datetimepicker/css/bootstrap-material-datetimepicker.css"), "html", null, true);
echo "\">\t
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 37
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/main.css"), "html", null, true);
echo "\">
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/animate.css"), "html", null, true);
echo "\">\t
\t\t<link href=\"https://unpkg.com/leaflet@1.0.1/dist/leaflet.css\" rel=\"stylesheet\"/>
\t\t";
// line 41
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\MainController::customStylesAction"));
echo "
";
// line 43
echo "\t\t
";
// line 44
$this->displayBlock('css', $context, $blocks);
// line 45
echo "
<title>
\t\t\t";
// line 47
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\MainController::titleAction"));
echo "
\t\t\t";
// line 48
echo "\t\t\t
\t\t</title>
\t\t";
// line 51
$this->displayBlock('extra_head', $context, $blocks);
// line 52
echo "
</head>
<body>
\t\t<div id=\"throbber\" style=\"display:none;color:#fff;\">
\t\t <h1><i class='fa fa-spin fa-spinner'></i></h1>
\t\t</div>
\t
";
// line 60
echo "\t\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\MainController::mainMenuAction"));
echo "
\t\t
";
// line 62
$this->displayBlock('body', $context, $blocks);
// line 63
echo "
";
// line 65
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\FooterController::footerAction"));
echo "
\t<!-- Back to top -->
\t<div class=\"btn-back-to-top\" id=\"myBtn\">
\t\t<span class=\"symbol-btn-back-to-top\">
\t\t\t<i class=\"zmdi zmdi-chevron-up\"></i>
\t\t</span>
\t</div>
\t
<style>
.inactive{
color: #666666 !important;
}
.inactive:hover{
color:rgb(0,86,179) !important;
}
.active{
color: #007bff !important;
}
.dataTables_wrapper .dataTables_filter input {
border: 1px solid #ccc;
}
/*set a border on the images to prevent shifting*/
#gallery_01 img{border:2px solid white;}
/*Change the colour*/
.elevatezoom-gallery active{border:2px solid #333 !important;}
.image-gallery{
margin-bottom: 6px !important;
border: 1px solid #eee !important;
width: 70px;
height: 70px;
}
.image-gallery:hover{
background-color: #eee;
}
.clearfix {
display: block;
width: 100%;
float: left;
}
.image1{
position: relative !important;
border: 1px solid #eee;
min-width: 100%;
display:block;
max-width: 100%;
height: auto;
}
</style>
<!--===============================================================================================-->\t
\t<script src=\"";
// line 126
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/jquery/jquery-3.2.1.min.js"), "html", null, true);
echo "\"></script>\t
<!--===============================================================================================-->
\t<script src=\"";
// line 128
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/animsition/js/animsition.min.js"), "html", null, true);
echo "\"></script>
<!--===============================================================================================-->
\t<script src=\"";
// line 130
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/bootstrap/js/popper.js"), "html", null, true);
echo "\"></script>
\t<script src=\"";
// line 131
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/bootstrap/js/bootstrap.min.js"), "html", null, true);
echo "\"></script>
<!--===============================================================================================-->
\t<script src=\"";
// line 133
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/select2/select2.min.js"), "html", null, true);
echo "\"></script>
<script src=\"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js\"></script>
\t<script>
\t\t\$(\".js-select2\").each(function(){
\t\t\t\$(this).select2({
\t\t\t\tminimumResultsForSearch: 20,
\t\t\t\tdropdownParent: \$(this).next('.dropDownSelect2')
\t\t\t});
\t\t})
\t</script>
<!--===============================================================================================-->
\t<script src=\"";
// line 144
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/daterangepicker/moment.min.js"), "html", null, true);
echo "\"></script>
\t<!--script src=\"vendor/daterangepicker/daterangepicker.js\"></script-->
\t<script src=\"";
// line 146
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker.min.js"), "html", null, true);
echo "\"></script>
\t<script src=\"";
// line 147
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker.es.min.js"), "html", null, true);
echo "\"></script>
<!--===============================================================================================-->
\t";
// line 151
echo "<!--===============================================================================================-->
\t<script src=\"";
// line 152
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/parallax100/parallax100.js"), "html", null, true);
echo "\"></script>
\t<script>
\$('.parallax100').parallax100();
\t</script>
<!--===============================================================================================-->
\t<script src=\"";
// line 157
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/MagnificPopup/jquery.magnific-popup.min.js"), "html", null, true);
echo "\"></script>
\t<script>
\t function startMagnific()
\t {
\t\t\t\$('.gallery-lb').each(function() { // the containers for all your galleries
\t\t\t\t\$(this).magnificPopup({
\t\t\t delegate: 'a', // the selector for gallery item
\t\t\t type: 'image',
\t\t\t gallery: {
\t\t\t \tenabled:true
\t\t\t },
\t\t\t mainClass: 'mfp-fade'
\t\t\t });
\t\t\t});
\t\t}
\t</script>
<!--===============================================================================================-->
\t<script src=\"";
// line 174
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/isotope/isotope.pkgd.min.js"), "html", null, true);
echo "\"></script>
<!--===============================================================================================-->
\t<script src=\"";
// line 176
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/jquery/jquery.elevatezoom.min.js"), "html", null, true);
echo "\"></script>\t
\t
\t<script src=\"";
// line 178
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/sweetalert/sweetalert.min.js"), "html", null, true);
echo "\"></script>\t
\t<script src=\"https://unpkg.com/leaflet@1.0.1/dist/leaflet.js\"></script>
\t<script src=\"";
// line 180
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/Control.OSMGeocoder.js"), "html", null, true);
echo "\"></script>
\t<script src=\"";
// line 181
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/OSMLocationPicker.js"), "html", null, true);
echo "\"></script>
\t<script src=\"";
// line 182
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/parsley.min.js"), "html", null, true);
echo "\"></script>\t
\t<script src=\"";
// line 183
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/parsley.es.js"), "html", null, true);
echo "\"></script>\t
\t<script src=\"";
// line 184
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/cleave.min.js"), "html", null, true);
echo "\"></script>
\t<script src=\"";
// line 185
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/jquery.confetti.js"), "html", null, true);
echo "\"></script>\t
<script src=\"";
// line 186
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/jquery.validate.min.js"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 187
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/dattaAble/assets/plugins/pnotify/js/pnotify.custom.min.js"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 188
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/dattaAble/assets/plugins/material-datetimepicker/js/bootstrap-material-datetimepicker.js"), "html", null, true);
echo "\"></script>\t
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js\"></script>
\t<!--script src=\"https://s3.amazonaws.com/documentacionpagalo/archivos/cybs_devicefingerprint.js\"></script-->\t
<!--===============================================================================================-->
\t<script src=\"";
// line 192
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/perfect-scrollbar/perfect-scrollbar.min.js"), "html", null, true);
echo "\"></script>
\t<script>
\t\t\$('.js-pscroll').each(function(){
\t\t\t\$(this).css('position','relative');
\t\t\t\$(this).css('overflow','hidden');
\t\t\tvar ps = new PerfectScrollbar(this, {
\t\t\t\twheelSpeed: 1,
\t\t\t\tscrollingThreshold: 1000,
\t\t\t\twheelPropagation: false,
\t\t\t});
\t\t\t\$(window).on('resize', function(){
\t\t\t\tps.update();
\t\t\t})
\t\t});
\t</script>
\t<script src=\"";
// line 209
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_original/bundles/ecommerce/main.js"), "html", null, true);
echo "\"></script>
\t\t<script type=\"text/javascript\">
\t\t\$(function () {
\t\t\tif (\$(\".dataTable\").length > 0) {
\t\t\t\tvar table = \$('.dataTable').DataTable({
\t\t\t\t\t\"language\": {
\t\t\t\t\t\t\"sProcessing\": \"Procesando...\",
\t\t\t\t\t\t\"sLengthMenu\": \"Mostrar _MENU_ registros\",
\t\t\t\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",
\t\t\t\t\t\t\"sEmptyTable\": \"Ningún dato disponible en esta tabla\",
\t\t\t\t\t\t\"sInfo\": \"Mostrando del _START_ al _END_ de _TOTAL_ registros\",
\t\t\t\t\t\t\"sInfoEmpty\": \"Mostrando del 0 al 0 de total de 0 registros\",
\t\t\t\t\t\t\"sInfoFiltered\": \"(filtrado de _MAX_ registros)\",
\t\t\t\t\t\t\"sInfoPostFix\": \"\",
\t\t\t\t\t\t\"sSearch\": \"Buscar:\",
\t\t\t\t\t\t\"sUrl\": \"\",
\t\t\t\t\t\t\"sInfoThousands\": \",\",
\t\t\t\t\t\t\"sLoadingRecords\": \"Cargando...\",
\t\t\t\t\t\t\"oPaginate\": {
\t\t\t\t\t\t\t\"sFirst\": \"Primero\",
\t\t\t\t\t\t\t\"sLast\": \"Último\",
\t\t\t\t\t\t\t\"sNext\": \"Siguiente\",
\t\t\t\t\t\t\t\"sPrevious\": \"Anterior\"
\t\t\t\t\t\t},
\t\t\t\t\t\t\"oAria\": {
\t\t\t\t\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",
\t\t\t\t\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t});
\t\t\t}
\t\t});
\t\tvar idioma_español = {
\t\t\t\"sProcessing\": \"Procesando...\",
\t\t\t\"sLengthMenu\": \"Mostrar _MENU_ registros\",
\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",
\t\t\t\"sEmptyTable\": \"Ningún dato disponible en esta tabla\",
\t\t\t\"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros\",
\t\t\t\"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0 registros\",
\t\t\t\"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",
\t\t\t\"sInfoPostFix\": \"\",
\t\t\t\"sSearch\": \"Buscar:\",
\t\t\t\"sUrl\": \"\",
\t\t\t\"sInfoThousands\": \",\",
\t\t\t\"sLoadingRecords\": \"Cargando...\",
\t\t\t\"oPaginate\": {
\t\t\t\t\"sFirst\": \"Primero\",
\t\t\t\t\"sLast\": \"Último\",
\t\t\t\t\"sNext\": \"Siguiente\",
\t\t\t\t\"sPrevious\": \"Anterior\"
\t\t\t},
\t\t\t\"oAria\": {
\t\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",
\t\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"
\t\t\t}
\t\t};
\t\t\$(\"input[type='search']\").css(\"border\", \"1px solid #ccc\");
\t</script>
\t<script>
\t
\t function register()
\t {
\t var password = \$('#password').val();
\t var passwordc = \$('#confirm_password').val();
\t var email = \$('#email').val();
\t var name = \$('#name').val();
\t var regex = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))\$/;
\t
\$('#email_incorrect').hide();
if(name == '' || password == '' || passwordc == '' || email == '' || name == '')
\t {
\t \$('#form_incorrect').show();
\t return false;
\t }else if(! regex.test(email)){
\$('#form_incorrect').hide();
\$('#email_incorrect').show();
return false;
}
\t
\t \$('#form_incorrect').hide();
\t
\t var saveButton = document.getElementById(\"btn-register\");
\t saveButton.setAttribute(\"disabled\", true);
\t saveButton.innerHTML = \"<span class='fa fa-spinner fa-spin' role='status'></span> Cargando...\";
\t
\t if(password != passwordc){
\t \$('#password_incorrect').show();
\t return false;
\t }
\t
\t //validamos cuenta
\t
\t validarEmail(email);
\t
\t
\t
\t }
\t
\t function validarPassword(){
\t var password = \$('#password').val();
\t var passwordc = \$('#confirm_password').val();
\t if(password != passwordc){
\t \$('#password_incorrect').show();
\t }else{
\t \$('#password_incorrect').hide();
\t }
\t }
\t
\t
\t
\t function validarEmail(email)
\t {
\t\t
\t var url = \"";
// line 328
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_register_validate", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 328, $this->source); })())]), "html", null, true);
echo "\";
\t
\t var data = {
\t email: email
\t };
\t
\t var saveButton = document.getElementById(\"btn-register\");
\t
\t \$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
\t if(data['resp'] == 'error'){
\t \$('#email_exist').show();
\t saveButton.removeAttribute(\"disabled\");
\t saveButton.innerHTML = \"Guardar\";
\t return false;
\t }else{
\t //saveButton.removeAttribute(\"disabled\");
\t //saveButton.innerHTML = \"Guardar\";
\t \$('#email_exist').hide();
\t saveAccount();
\t //return true;
\t }
\t
\t
\t },
\t error: function(data){
\t console.log(data);
\t }
\t });
\t
\t }
\t
\t function saveAccount()
\t {
\t
\t var url = \"";
// line 366
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_register_customer", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 366, $this->source); })())]), "html", null, true);
echo "\";
\t
\t var password = \$('#password').val();
\t var email = \$('#email').val();
\t var name = \$('#name').val();
\t var autologin = true;//\$('#autologin').val();
\t var saveButton = document.getElementById(\"btn-register\");
\t var data = {
\t\t\t\t_username: email,
\t\t\t\t_password: password,
\t\t\t\t_name: name,
\t\t\t\t_autologin: autologin
\t };
\t
\t \$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
\t
\t if(data['resp'] == 'exito')
\t\t\t\t\t{
\t //\$('#success_alert').show();
\t
if(autologin == true)
\t\t\t\t\t\t {
autoLogin(email, password);
}else{
window.location.href = window.location.href;
}
\t }else{
\t\t\t\t\t\tsaveButton.removeAttribute(\"disabled\");
\t saveButton.innerHTML = \"Guardar\";
\t \$('#danger_alert').show();
\t }
\t
\t },
\t error: function(data){
\t console.log(data);
\t }
\t });
\t }
function autoLogin(email, password)
\t\t\t{
\t\t\t\t\$('#_xEmail').val(email);
\t\t\t\t\$('#_xData').val(password);
\t\t\t\t\$('#loginForm').submit();
/*var url = \"";
// line 415
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_customer_login", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 415, $this->source); })())]), "html", null, true);
echo "\";
var data = {
\t\t\t\t\t_username: email,
\t\t\t\t\t_password: password,
\t\t\t\t\tautologin: true
\t \t};
\$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
window.location.href = window.location.href;
\t\t\t\t\t},
\t\t\t\t\terror: function(data){
\t\t\t\t\t\tconsole.log(data);
\t\t\t\t\t}
\t \t}); */
}
\t</script>
\t
\t<script>
\t
\t//Refrescar la carretilla en cuanto se abra la pagina\t
\tvar data = {};
\tvar url = \"";
// line 442
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_store_product", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 442, $this->source); })())]), "html", null, true);
echo "\";
\t\$.ajax({ type: \"POST\",
\t url: url,
\t async: false,
\t data: data,
\t success : function(data)
\t {
\t \t\$('.cart_container').html(data.html);\t
\t }
\t});
\tfunction hideModal1()
\t{
\t\t\$('.js-hide-modal1').on('click',function()
\t\t{
\t\t\t\$('.wrap-modal1').removeClass(\"show-modal1\");
\t\t});
\t}
\t
\tfunction closeModal()
\t{
\t\t\$('.wrap-modal1').removeClass(\"show-modal1\");
\t}
\t
\t
\t";
// line 469
if (((isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 469, $this->source); })()) != "")) {
// line 470
echo "\t\t//loadCategory(1,\"";
echo twig_escape_filter($this->env, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 470, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 470, $this->source); })()), "html", null, true);
echo "\");\t\t
\t\tloadCategory(1,\"";
// line 471
echo twig_escape_filter($this->env, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 471, $this->source); })()), "html", null, true);
echo "\",\"10\");\t\t
\t";
} else {
// line 473
echo " ";
if ((((isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 473, $this->source); })()) != "") && ((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 473, $this->source); })()) != ""))) {
// line 474
echo " //loadCategory(5,'";
echo twig_escape_filter($this->env, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 474, $this->source); })()), "html", null, true);
echo "',\"";
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 474, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 474, $this->source); })()), "html", null, true);
echo "\", \"";
echo twig_escape_filter($this->env, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 474, $this->source); })()), "html", null, true);
echo "\");
\t\t\t\tloadCategory(5,'";
// line 475
echo twig_escape_filter($this->env, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 475, $this->source); })()), "html", null, true);
echo "',\"10\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 475, $this->source); })()), "html", null, true);
echo "\", \"";
echo twig_escape_filter($this->env, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 475, $this->source); })()), "html", null, true);
echo "\");
";
} else {
// line 477
echo " ";
if (((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 477, $this->source); })()) != "")) {
// line 478
echo " //loadCategory(3,\"";
echo twig_escape_filter($this->env, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 478, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 478, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 478, $this->source); })()), "html", null, true);
echo "\");
\t\t\t\t\tloadCategory(3,\"";
// line 479
echo twig_escape_filter($this->env, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 479, $this->source); })()), "html", null, true);
echo "\",\"10\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 479, $this->source); })()), "html", null, true);
echo "\");
";
} elseif ((( // line 480
(isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 480, $this->source); })()) == "") && ((isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 480, $this->source); })()) == ""))) {
// line 481
echo " //loadCategory(0,'',\"";
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 481, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 481, $this->source); })()), "html", null, true);
echo "\");
\t\t\t\t\tloadCategory(0,'',\"10\",\"";
// line 482
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 482, $this->source); })()), "html", null, true);
echo "\");
";
}
// line 484
echo "
";
// line 485
if (((isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 485, $this->source); })()) != "")) {
// line 486
echo " //loadCategory(4,'";
echo twig_escape_filter($this->env, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 486, $this->source); })()), "html", null, true);
echo "',\"";
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 486, $this->source); })()), "html", null, true);
echo "\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 486, $this->source); })()), "html", null, true);
echo "\");
\t\t\t\t\tloadCategory(4,'";
// line 487
echo twig_escape_filter($this->env, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 487, $this->source); })()), "html", null, true);
echo "',\"10\",\"";
echo twig_escape_filter($this->env, (isset($context["globalSearch"]) || array_key_exists("globalSearch", $context) ? $context["globalSearch"] : (function () { throw new RuntimeError('Variable "globalSearch" does not exist.', 487, $this->source); })()), "html", null, true);
echo "\");
";
}
// line 489
echo " ";
}
echo "
\t";
}
// line 491
echo "\t
\t\$(document).on('show.bs.modal', '.modal', function()
\t{
\t\t
\t var zIndex = 10000 + (10 * \$('.modal:visible').length);
\t \$(this).css('z-index', zIndex);
\t setTimeout(function() {
\t \$('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
\t }, 0);
\t
\t});
\t
\tfunction loadCategory(type,token,limit = false,search=\"\", token2 = \"\")
\t{
\t\t
\t\tvar url = \"";
// line 509
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_get_product", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 509, $this->source); })())]), "html", null, true);
echo "\";
\t\t
\t\tvar data = {
\t\t\ttype: type,
\t\t\ttoken: token,
token2: token2,
\t\t\tlimit: limit,
\t\t\tfirst: true,
\t\t\tsearch:search,
\t\t\tisMore: 0
\t\t};
\t\t\t\t
\t\t\$('#pager_label').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\t
\t\t\$('#dynamic_loader').load(url,data,function(a,b)
\t\t{
\t\t\t
\t\t\t\$('#search_field_loader_1').html(\"\");\t\t
\t\t\tif(a == \"\")
\t\t\t{
\t\t\t\t\$('#pager_control').hide();
\t\t\t\t\$('#pager_label').html(\"<h1 style='font-size:100px;margin:0px;'><i class='fa fa-search'></i></h1><h4>No se encontraron resultados...</h4><p>Agregamos productos a nuestro inventario muy frecuentemente.<br>El producto que buscaste podría estar disponible pronto.</p>\");
\t\t\t\t
\t\t\t} else {
\t\t\t\t\$('#pager_control').show();
\t\t\t\tvar total = \$('#total_current_list').val();
\t\t\t\tvar total_filtered = \$('#count_current_list').val();
\t\t\t\t
\t\t\t\tif(parseInt(limit,10) > parseInt(total,10))
\t\t\t\t{
\t\t\t\t\t
\t\t\t\t \$('#pager_label').html(\"Mostrando \"+total_filtered+\" de \"+total+\"<br><p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t\t\t \$('#pager_control').hide();
\t\t\t\t} else {
\t\t\t\t\t\$('#pager_label').html(\"Mostrando \"+limit+\" de \"+total);
\t\t\t\t\t\$('#pager_control').show();\t
\t\t\t\t}
\t\t\t\t
\t\t\t\t\$('#dynamic_loader').addClass('isotope-grid');
\t\t\t\t\$('#pager_control').attr('data-type',type);
\t\t\t\t\$('#pager_control').attr('data-token',token);
\t\t\t\t\$('#pager_control').attr('data-limit',limit);
\t\t\t\t
\t\t\t\t//startSlick();\t
\t\t\t\tstartMagnific();
\t\t\t\thideModal1();
\t\t\t}
\t\t});
\t}\t
\tfunction loadMore()
\t{
\t\t//var newLimit = parseInt(\$('#pager_control').attr('data-limit'))+";
// line 563
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 563, $this->source); })()), "html", null, true);
echo ";
\t\tvar newLimit = parseInt(\$('#pager_control').attr('data-limit'))+10;
\t\t\$('#pager_control a').html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\$('#pager_control a').prop(\"disabled\",true);
\t\t
\t\tvar url = \"";
// line 569
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_get_product", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 569, $this->source); })())]), "html", null, true);
echo "\";
var category = '";
// line 570
echo twig_escape_filter($this->env, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 570, $this->source); })()), "html", null, true);
echo "';
\t\tvar data = {
\t\t\ttype: \$('#pager_control').attr('data-type'),
\t\t\ttoken: \$('#pager_control').attr('data-token'),
\t\t\ttoken2: category,
\t\t\t//limit: \$('#pager_control').attr('data-limit')+','+'";
// line 575
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 575, $this->source); })()), "html", null, true);
echo "',
\t\t\tlimit: \$('#pager_control').attr('data-limit')+','+'10',
\t\t\tfirst: false,
\t\t\tisMore: 1\t\t
\t\t};
\t\t
\t\tvar response;
\t\t\$.ajax({ type: \"POST\",
\t\t url: url,
\t\t async: false,
\t\t data: data,
\t\t success : function(text)
\t\t {
\t\t \t
\t\t \t if(text == '')
\t\t \t {
\t\t \t \t\$('#pager_control').html(\"<p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t \t } else {
\t\t\t response = text;
\t\t\t var total = \$('#total_current_list').val();
\t\t\t if(newLimit > total)
\t\t\t {
\t\t\t \t\$('#pager_control').html(\"<p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t\t \t\$('#pager_label').html(\"Mostrando \"+total+\" de \"+total);
\t\t\t } else {
\t\t\t\t\t\t\$('#pager_label').html(\"Mostrando \"+newLimit+\" de \"+total);\t\t\t \t
\t\t\t }
\t\t\t \$('#pager_control').attr('data-limit',newLimit);
\t\t\t \$('#pager_control a').prop(\"disabled\",false);
\t\t\t \$('#pager_control a').html(\"Cargar más\");
\t\t\t
\t\t\t \$('#dynamic_loader').append(response);
\t\t\t
\t\t\t //startSlick();
\t\t\t \t startMagnific();
\t\t\t \t hideModal1();
\t\t }
\t\t }
\t\t});
\t\t
\t\t
\t\t\t\t
\t}\t
\t
\t
\t
\t\$('#search_field_1').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t\$('#search_field_loader_1').html(\"<i class='fa fa-spin fa-spinner'></i> Buscando...\");
\t\tvar value = \$('#search-product-1').val();\t\t
\t\t//loadCategory(false,false,";
// line 627
echo twig_escape_filter($this->env, (isset($context["pager_limit"]) || array_key_exists("pager_limit", $context) ? $context["pager_limit"] : (function () { throw new RuntimeError('Variable "pager_limit" does not exist.', 627, $this->source); })()), "html", null, true);
echo ",value);
\t\tloadCategory(false,false,10,value);
\t});
\t
\t
\t\$('#global_search').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t
\t\tvar value = \$('#search').val();
\t\tvar encoded = encodeURIComponent(value).replace(/%20/g,'+');
\t\tvar string_url = \"";
// line 638
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_product", ["search" => "_ENCODED_", "slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 638, $this->source); })())]), "html", null, true);
echo "\";
\t\tvar location = string_url.replace(\"_ENCODED_\",encoded);
\t\t
\t\twindow.location.href = location;
\t});
\t\t
\t
\tfunction refreshPreview()
\t{
\t\t
\t\tvar url = \"_cart_preview.php\";
\t\tvar data = {};
\t\t\$('#cart_preview').html(\"<div class='row'><div class='col-md-12 text-center'><h1><i class='fa fa-spin fa-spinner'></i></h1></div></div>\");
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(html)
\t\t {
\t\t \t console.log(\"refreshPreviewSuccess\");
\t\t\t \$('#cart_preview').html(html);\t\t\t \t\t\t \t
\t\t }
\t\t});
\t}
\t
\t
\tfunction refreshSideCart()
\t{
\t\t
\t\t\$('.js-panel-cart').addClass('show-header-cart');
\t refreshPreview();
\t}
\t
\tfunction validateStockDirect(stock)
\t{
\t\tvar msg = \"\";
\t\tif(stock == ''){
\t\t\tstock = 0;
\t\t\tmsg = \"El producto no se encuentra disponible\";
\t\t}else{
\t\t\tstock = parseInt(stock,10);
\t\t\tmsg= \"Hay \"+stock+\" unidades disponibles de este producto\";
\t\t\tif(stock == 1){
\t\t\t\t\tmsg= \"Hay 1 unidad disponible de este producto\";
\t\t\t}
\t\t}
\t\t
\t\tif(stock < 1){
\t\t\tswal(\"Oops\", msg);
\t\t\treturn false;
\t\t}else{
\t\t\t\$(\".containerToggle\").toggle()
\t\t}
}
\tfunction increaseInput(pid,oid,stock,preview,checkout = false)
\t{
\t\tif(stock != 'not_stock')
\t\t{
\t\t\t
\t\t\tvar cant = \$('.cartInput'+pid).val();
\t\t\tvar new_cant = parseInt(cant,10)+1;
\t\t\tconsole.log(new_cant);
\t\t\tconsole.log(stock);
\t\t\tvar msg = \"\";
\t\t\tif(stock == '')
\t\t\t{
\t\t\t\tstock = 0;
\t\t\t\tmsg = \"El producto no se encuentra disponible\";
\t\t\t} else {
\t\t\t\tstock = parseInt(stock,10);
\t\t\t\tmsg= \"Hay \"+stock+\" unidades disponibles de este producto\";
\t\t\t
\t\t\t\tif(stock == 1)
\t\t\t\t{
\t\t\t\t\tmsg= \"Hay 1 unidad disponible de este producto\";
\t\t\t\t}
\t\t\t}
\t\t\tif(new_cant > stock)
\t\t\t{
\t\t\t\tswal(\"Oops\", msg);
\t\t\t\treturn false;
\t\t\t}
\t\t}
\t\tif(\$('#main_cart_container').next('div.popover:visible').length == 0)
\t\t{
\t\t\t//Ocultar popover para mobiles
\t\t\tif(window.innerWidth <= 800)
\t\t\t{
\t\t\t
\t\t\t} else {
\t\t\t\t
\t\t\t\tsetTimeout(function()
\t\t\t\t{
\t\t\t\t\t
\t\t\t\t\tvar imgSrc = \$('#cart_picture_for_'+pid).attr('src');
\t\t\t\t\tvar name = \$('#cart_picture_for_'+pid).attr('alt');
\t\t\t\t\tvar imgTag = \"<img style='height:150px;margin:0 auto;' src='\"+imgSrc+\"'>\";
\t\t\t\t\t
\t\t\t\t\t\$('#main_cart_container').popover({
\t\t\t\t\t\thtml:true,
\t\t\t\t\t\tcontainer: 'body',\t\t\t\t \t
\t\t\t\t\t\ttitle: '<i class=\"fa fa-checkmark\"></i> Producto agregado',
\t\t\t\t\t\tcontent:'<div class=\"row\"><div class=\"col-md-12 text-center\">'+imgTag+'</div><div class=\"col-md-12 text-center\">'+name+'</div></div>',
\t\t\t\t\t\tplacement: 'bottom'
\t\t\t\t\t});
\t\t\t\t\t
\t\t\t\t\t\$('#main_cart_container').popover('show');\t
\t\t\t\t\t
\t\t\t\t\tsetTimeout(function()
\t\t\t\t\t{
\t\t\t\t\t\t\$('#main_cart_container').popover('dispose');
\t\t\t\t\t}, 1000);
\t\t\t\t
\t\t\t\t},1000);
\t\t\t}
\t\t}
\t\t
\t\t
\t\t
\t\tvar val = \$('#cartInput'+pid).val();
\t\tvar new_val = parseInt(val)+1;\t\t
\t\t
\t\t\$('.cartInput'+pid).val(new_val);
\t\t\$('#cartInput'+pid).val(new_val);
\t\t
\t\taddToCart(pid,oid,preview,checkout);
\t\t
\t\t\$('#cart_counter_for_'+pid).show();
\t\t\$('#cart_starter_for_'+pid).hide();
\t\t\$('#cart2_counter_for_'+pid).show();
\t\t\$('#cart2_starter_for_'+pid).hide();
\t\t\$('#cart3_counter_for_'+pid).show();
\t\t\$('#cart3_starter_for_'+pid).hide();
\t\t
\t}
\t
\tfunction decreaseInput(pid,oid,preview,checkout = false)
\t{
\t\t
\t\tvar val = \$('#cartInput'+pid).val();
\t\tif(val > 0)
\t\t{
\t\t\tvar new_val = parseInt(val)-1;
\t\t\t
\t\t\t\$('.cartInput'+pid).val(new_val);
\t\t\t\$('#cartInput'+pid).val(new_val);
\t\t\t
\t\t\tif(new_val < 1)
\t\t\t{
\t\t\t\t\$('#cart_counter_for_'+pid).hide();
\t\t\t\t\$('#cart_starter_for_'+pid).show();
\t\t\t\t\$('#cart2_counter_for_'+pid).hide();
\t\t\t\t\$('#cart2_starter_for_'+pid).show();
\t\t\t\t\$('#cart3_counter_for_'+pid).hide();
\t\t\t\t\$('#cart3_starter_for_'+pid).show();
\t\t\t}
\t\t\t
\t\t\taddToCart(pid,oid,preview,checkout);\t\t\t\t\t\t
\t\t}\t
\t}
\t
\t
\tfunction addToCart(pid,oid,preview,checkout = false)
\t{
\t\t
\t\tvar url = \"";
// line 811
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_store_product", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 811, $this->source); })())]), "html", null, true);
echo "\";
\t\t\$('.cart_container').removeClass(\"animated bounceInRight\");\t\t
\t
\t\tvar data = {
\t\t\tcart: true,
\t\t\toid: oid,
\t\t\tpid: pid,
\t\t\tquantity: \$('#cartInput'+pid).val()
\t\t};\t\t
\t\t
\t\t\$('.cart_container').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\t
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(data)
\t\t {
\t\t\t
\t\t\t var html = data.html;
\t\t \t \$('.cart_container').html(html);
\t\t \t
\t\t \t
\t\t\t \$('.cart_container').addClass(\"animated bounceInDown\");
\t\t\t closeModal();
\t\t\t //refreshSideCart();
\t\t\t if(\$('#cartInput'+pid).val() < 1)
\t\t\t {\t\t\t \t
\t\t\t \t \$('#cart_item_'+pid).remove();
\t\t\t \t \$('#session_quantity_'+pid).html(\"\");
\t\t\t \t \$('#session2_quantity_'+pid).html(\"\");
\t\t\t \t \$('#session3_quantity_'+pid).html(\"\");
\t\t\t } else {
\t\t\t \t \$('#session_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t \t \$('#session2_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t \t \$('#session3_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t }\t
\t\t\t
\t\t\t if(preview)
\t\t\t {
\t\t\t \t refreshPreview();
\t\t\t \t ";
// line 857
echo "\t\t\t }\t
\t\t\t
\t\t\t if(checkout)
\t\t\t {
\t\t\t \t refreshCheckoutTable();\t\t\t \t
\t\t\t }\t
\t\t\t
\t\t }
\t\t});
\t\t
\t}\t
\t\t
\t\t
\tfunction removeItemFromCart(key,pid)
\t{
\t\tvar url = \"";
// line 872
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_store_product", ["slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 872, $this->source); })())]), "html", null, true);
echo "\";
\t\tvar data = {
\t\t\tremove:true,
\t\t\tkey:key
\t\t};
\t\t
\t\t
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(html)
\t\t {
\t\t \t \$('.cart_container').html(html);
\t\t \t \$('#cart_item_'+pid).remove();
\t\t\t //refreshSideCart();
\t\t\t refreshPreview();
\t\t\t \$('#session_quantity_'+pid).html(\"\");
\t\t\t \$('#session2_quantity_'+pid).html(\"\");
\t\t\t \$('#session3_quantity_'+pid).html(\"\");
\t\t\t ";
// line 897
echo "\t\t }
\t\t});
\t\t
\t}\t
\t
\t
\t
\tfunction startFields(cid,type,label,pid)
\t{\t\t\t\t\t\t
\t\tvar url = \"API_____fields.php\";\t\t
\t\tvar data = {
\t\t\tclient_id: cid,
\t\t\tis_web:true,
\t\t\tdata: {
\t\t\t\tdynamic: type,
\t\t\t\tpid:pid\t\t\t\t
\t\t\t}
\t\t};
\t\t
\t\tif(type == 'direct')
\t\t{
\t\t\t\$('#start_direct_'+pid).html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\t\$('#start_direct_'+pid).prop(\"disabled\",true);
\t\t}
\t\t
\t\t
\t\t
\t\t\$.ajax({ type: \"POST\",
\t\t url: url,
\t\t crossDomain: true,
\t\t async: false,
\t\t data: JSON.stringify(data),
\t\t dataType: \"json\",
\t\t success : function(response)
\t\t { \t\t
\t\t \t//\$('#start_direct_'+pid).html(label); \t
\t\t\t\t//\$('#start_direct_'+pid).prop(\"disabled\",false);
\t\t \t var url = \"_fields_convert.php\"
\t\t \t
\t\t \t if(type =='cart')
\t\t \t {\t\t \t \t
\t\t \t\t \$('.fields_cart').load(url,response,function(a)
\t\t\t \t {\t\t\t \t\t\t \t \t\t\t \t
\t\t\t\t\t\t\$('#direct_panel_'+pid).show(\"fast\");
\t\t\t \t });
\t\t \t }
\t\t \t
\t\t \t if(type == 'direct')
\t\t\t\t {
\t\t\t\t \t\$('#start_direct_'+pid).html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\t\t\t\$('#start_direct_'+pid).prop(\"disabled\",true);
\t\t\t\t \t\$('.fields_'+pid).load(url,response,function(a)
\t\t\t \t{
\t\t\t \t \t\$('#direct_start_btn_'+pid).hide();
\t\t\t\t\t\t\$('#direct_panel_'+pid).show(\"fast\");
\t\t\t \t});\t\t\t\t\t
\t\t\t\t }
\t\t\t\t
\t\t\t\t if(type == 'contact')
\t\t\t\t {
\t\t\t\t \t\$('#contact_form_holder_'+label).load(url,response,function(a)
\t\t\t \t{
\t\t\t \t \t
\t\t\t \t});
\t\t\t\t }
\t\t\t\t
\t\t }
\t\t});
\t\t
\t\t
\t}
\t
\t
\t
\tfunction submitDirect(pid)
\t{
\t\t\t\t
\t\tif(!\$('#direct_form_'+pid).parsley().validate())
\t\t{
\t\t\tswal(\"Campos requeridos\", \"Nombre y teléfono son campos requeridos\", \"error\");
\t\t} else {
\t\t\t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",false);
\t\t\t\$('#direct_panel_cnf_btn_'+pid).html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\"); \t\t
\t\t\tvar url = \"_direct_control.php\";\t
\t\t\t
\t\t\t\$.ajax({
\t url: url,
\t type: 'post',
\t dataType: 'json',
\t data: \$('form#direct_form_'+pid).serialize(),
\t success: function(data) {\t \t
\t \tif(data.status == \"success\")
\t \t{\t
\t \t\t\$('#direct_panel_'+pid).hide();\t
\t \t\t\$('#direct_success_'+pid).show();
\t \t\t
\t \t} else {
\t \t\t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",true);
\t \t\t\$('#direct_panel_cnf_btn_'+pid).html(\"Intentar de nuevo\");
\t \t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t \t}
\t\t },
\t\t error: function(data)
\t\t {
\t\t \t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",true);
\t\t\$('#direct_panel_cnf_btn_'+pid).html(\"Intentar de nuevo\");
\t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t\t }
\t \t});
\t}
\t}
\t
\t
\t
\tfunction closeModal(id){
\$('#'+id).modal('hide');
}
\t
\t\$('#contact_form').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t
\t\t\$('#contact_btn').prop(\"disabled\",true);
\t\t\$('#contact_btn').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\tvar url = \"_contact_form.php\";\t
\t\t\t
\t\t\$.ajax({
\t url: url,
\t type: 'post',
\t dataType: 'json',
\t data: \$('form#contact_form').serialize(),
\t success: function(data) {\t \t
\t \tif(data.status == \"success\")
\t \t{\t
\t \t \t\t
\t \t\t\$('#contact_btn_container').html(\"<br><h1 style='text-align:center;'><i class='fa fa-check' style='color:green'></i></h1><h3 style='text-align:center;'>¡Gracias!<br>Hemos recibido el mensaje correctamente. Responderemos muy pronto.</h3>\");
\t \t\t
\t \t} else {
\t \t\t\$('#contact_btn').prop(\"disabled\",false);
\t \t\t\$('#contact_btn').html(\"Intentar de nuevo\");
\t \t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t \t}
\t\t }
\t });
\t
\t});
\t
\t</script>
\t
\t";
// line 1052
$this->displayBlock('script', $context, $blocks);
// line 1055
echo "\t
\t<!-- CHAT WIDGET -->
";
// line 1058
echo "\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\MainController::chatWidgetAction"));
echo "
<!-- WHATSAPP WIDGET -->
";
// line 1063
echo "\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Frontend\\MainController::whatsappWidgetAction"));
echo "
</body>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 44
public function block_css($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 51
public function block_extra_head($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extra_head"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extra_head"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 62
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 1052
public function block_script($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "script"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "script"));
// line 1053
echo "\t
\t";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Frontend/base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1439 => 1053, 1429 => 1052, 1411 => 62, 1393 => 51, 1375 => 44, 1361 => 1063, 1353 => 1058, 1349 => 1055, 1347 => 1052, 1190 => 897, 1167 => 872, 1150 => 857, 1106 => 811, 930 => 638, 916 => 627, 861 => 575, 853 => 570, 849 => 569, 840 => 563, 783 => 509, 763 => 491, 757 => 489, 750 => 487, 741 => 486, 739 => 485, 736 => 484, 731 => 482, 724 => 481, 722 => 480, 716 => 479, 707 => 478, 704 => 477, 695 => 475, 684 => 474, 681 => 473, 676 => 471, 669 => 470, 667 => 469, 637 => 442, 607 => 415, 555 => 366, 514 => 328, 392 => 209, 372 => 192, 365 => 188, 361 => 187, 357 => 186, 353 => 185, 349 => 184, 345 => 183, 341 => 182, 337 => 181, 333 => 180, 328 => 178, 323 => 176, 318 => 174, 298 => 157, 290 => 152, 287 => 151, 282 => 147, 278 => 146, 273 => 144, 259 => 133, 254 => 131, 250 => 130, 245 => 128, 240 => 126, 175 => 65, 172 => 63, 170 => 62, 164 => 60, 155 => 52, 153 => 51, 148 => 48, 144 => 47, 140 => 45, 138 => 44, 135 => 43, 131 => 41, 125 => 38, 121 => 37, 117 => 36, 112 => 34, 107 => 32, 102 => 30, 97 => 28, 92 => 26, 87 => 24, 82 => 22, 77 => 20, 73 => 19, 69 => 18, 64 => 16, 47 => 1,);
}
public function getSourceContext()
{
return new Source("<!doctype html>
<html lang=\"en\">
<head>
<!-- Required meta tags -->
<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
<meta name=\"description\" content=\"Tu tienda online fácil y rápido\">
<!--meta name=\"keywords\" content=\"tienda online, app, ecommerce, website\"-->
<!-- Font -->
<link rel=\"dns-prefetch\" href=\"http://fonts.googleapis.com\">
\t\t<link href=\"https://fonts.googleapis.com/css?family=Montserrat:400,700|Playfair+Display:400,700|Poppins:200,300,400,400i,500,700&display=swap\" rel=\"stylesheet\">
<link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\">
<!-- Bootstrap CSS -->
<link rel=\"stylesheet\" href=\"{{ asset('assets_original/css/bootstrap4.min.css') }}\">
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css\">
<link rel=\"stylesheet\" href=\"{{ asset('assets_original/bundles/ecommerce/animate/animate.css') }}\">
<link rel=\"stylesheet\" href=\"{{ asset('assets_original/bundles/dattaAble/assets/css/pages/pnotify.css') }}\">
<link rel=\"stylesheet\" href=\"{{ asset('assets_original/bundles/ecommerce/css-hamburgers/hamburgers.min.css') }}\">
<link href=\"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css\" rel=\"stylesheet\">
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/animsition/css/animsition.min.css') }}\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/select2/select2.min.css') }}\">
\t<!--===============================================================================================-->\t
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker3.min.css') }}\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/slick/slick.css') }}\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/MagnificPopup/magnific-popup.css') }}\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/perfect-scrollbar/perfect-scrollbar.css') }}\">
\t<!--===============================================================================================-->
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/util.css') }}\">\t
\t<!--===============================================================================================-->\t
<link rel=\"stylesheet\" href=\"{{ asset('assets_original/bundles/dattaAble/assets/plugins/material-datetimepicker/css/bootstrap-material-datetimepicker.css') }}\">\t
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/main.css') }}\">
\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{{ asset('assets_original/bundles/ecommerce/animate.css') }}\">\t
\t\t<link href=\"https://unpkg.com/leaflet@1.0.1/dist/leaflet.css\" rel=\"stylesheet\"/>
\t\t{{ render(controller('App\\\\Controller\\\\Frontend\\\\MainController::customStylesAction')) }}
{#{ render(controller(\"AppBundle:Frontend/Main:customStyles\")) }#}
\t\t
{% block css %}{% endblock %}
<title>
\t\t\t{{ render(controller('App\\\\Controller\\\\Frontend\\\\MainController::titleAction')) }}
\t\t\t{#{ render(controller(\"AppBundle:Frontend/Main:title\")) }#}\t\t\t
\t\t</title>
\t\t{% block extra_head %}{% endblock %}
</head>
<body>
\t\t<div id=\"throbber\" style=\"display:none;color:#fff;\">
\t\t <h1><i class='fa fa-spin fa-spinner'></i></h1>
\t\t</div>
\t
{#{ render(controller(\"AppBundle:Frontend/Main:mainMenu\")) }#}
\t\t{{ render(controller('App\\\\Controller\\\\Frontend\\\\MainController::mainMenuAction')) }}
\t\t
{% block body %}{% endblock %}
{#{ render(controller(\"AppBundle:Frontend/Footer:footer\")) }#}
{{ render(controller('App\\\\Controller\\\\Frontend\\\\FooterController::footerAction')) }}
\t<!-- Back to top -->
\t<div class=\"btn-back-to-top\" id=\"myBtn\">
\t\t<span class=\"symbol-btn-back-to-top\">
\t\t\t<i class=\"zmdi zmdi-chevron-up\"></i>
\t\t</span>
\t</div>
\t
<style>
.inactive{
color: #666666 !important;
}
.inactive:hover{
color:rgb(0,86,179) !important;
}
.active{
color: #007bff !important;
}
.dataTables_wrapper .dataTables_filter input {
border: 1px solid #ccc;
}
/*set a border on the images to prevent shifting*/
#gallery_01 img{border:2px solid white;}
/*Change the colour*/
.elevatezoom-gallery active{border:2px solid #333 !important;}
.image-gallery{
margin-bottom: 6px !important;
border: 1px solid #eee !important;
width: 70px;
height: 70px;
}
.image-gallery:hover{
background-color: #eee;
}
.clearfix {
display: block;
width: 100%;
float: left;
}
.image1{
position: relative !important;
border: 1px solid #eee;
min-width: 100%;
display:block;
max-width: 100%;
height: auto;
}
</style>
<!--===============================================================================================-->\t
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/jquery/jquery-3.2.1.min.js') }}\"></script>\t
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/animsition/js/animsition.min.js') }}\"></script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/bootstrap/js/popper.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/bootstrap/js/bootstrap.min.js') }}\"></script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/select2/select2.min.js') }}\"></script>
<script src=\"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js\"></script>
\t<script>
\t\t\$(\".js-select2\").each(function(){
\t\t\t\$(this).select2({
\t\t\t\tminimumResultsForSearch: 20,
\t\t\t\tdropdownParent: \$(this).next('.dropDownSelect2')
\t\t\t});
\t\t})
\t</script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/daterangepicker/moment.min.js') }}\"></script>
\t<!--script src=\"vendor/daterangepicker/daterangepicker.js\"></script-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker.min.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/datepicker/bootstrap-datepicker.es.min.js') }}\"></script>
<!--===============================================================================================-->
\t{#<script src=\"{{ asset('assets_original/bundles/ecommerce/slick/slick.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/slick-custom.js') }}\"></script>#}
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/parallax100/parallax100.js') }}\"></script>
\t<script>
\$('.parallax100').parallax100();
\t</script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/MagnificPopup/jquery.magnific-popup.min.js') }}\"></script>
\t<script>
\t function startMagnific()
\t {
\t\t\t\$('.gallery-lb').each(function() { // the containers for all your galleries
\t\t\t\t\$(this).magnificPopup({
\t\t\t delegate: 'a', // the selector for gallery item
\t\t\t type: 'image',
\t\t\t gallery: {
\t\t\t \tenabled:true
\t\t\t },
\t\t\t mainClass: 'mfp-fade'
\t\t\t });
\t\t\t});
\t\t}
\t</script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/isotope/isotope.pkgd.min.js') }}\"></script>
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/jquery/jquery.elevatezoom.min.js') }}\"></script>\t
\t
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/sweetalert/sweetalert.min.js') }}\"></script>\t
\t<script src=\"https://unpkg.com/leaflet@1.0.1/dist/leaflet.js\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/Control.OSMGeocoder.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/OSMLocationPicker.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/parsley.min.js') }}\"></script>\t
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/parsley.es.js') }}\"></script>\t
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/cleave.min.js') }}\"></script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/jquery.confetti.js') }}\"></script>\t
<script src=\"{{ asset('assets_original/bundles/ecommerce/jquery.validate.min.js') }}\"></script>
<script src=\"{{ asset('assets_original/bundles/dattaAble/assets/plugins/pnotify/js/pnotify.custom.min.js') }}\"></script>
<script src=\"{{ asset('assets_original/bundles/dattaAble/assets/plugins/material-datetimepicker/js/bootstrap-material-datetimepicker.js') }}\"></script>\t
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js\"></script>
\t<!--script src=\"https://s3.amazonaws.com/documentacionpagalo/archivos/cybs_devicefingerprint.js\"></script-->\t
<!--===============================================================================================-->
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/perfect-scrollbar/perfect-scrollbar.min.js') }}\"></script>
\t<script>
\t\t\$('.js-pscroll').each(function(){
\t\t\t\$(this).css('position','relative');
\t\t\t\$(this).css('overflow','hidden');
\t\t\tvar ps = new PerfectScrollbar(this, {
\t\t\t\twheelSpeed: 1,
\t\t\t\tscrollingThreshold: 1000,
\t\t\t\twheelPropagation: false,
\t\t\t});
\t\t\t\$(window).on('resize', function(){
\t\t\t\tps.update();
\t\t\t})
\t\t});
\t</script>
\t<script src=\"{{ asset('assets_original/bundles/ecommerce/main.js') }}\"></script>
\t\t<script type=\"text/javascript\">
\t\t\$(function () {
\t\t\tif (\$(\".dataTable\").length > 0) {
\t\t\t\tvar table = \$('.dataTable').DataTable({
\t\t\t\t\t\"language\": {
\t\t\t\t\t\t\"sProcessing\": \"Procesando...\",
\t\t\t\t\t\t\"sLengthMenu\": \"Mostrar _MENU_ registros\",
\t\t\t\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",
\t\t\t\t\t\t\"sEmptyTable\": \"Ningún dato disponible en esta tabla\",
\t\t\t\t\t\t\"sInfo\": \"Mostrando del _START_ al _END_ de _TOTAL_ registros\",
\t\t\t\t\t\t\"sInfoEmpty\": \"Mostrando del 0 al 0 de total de 0 registros\",
\t\t\t\t\t\t\"sInfoFiltered\": \"(filtrado de _MAX_ registros)\",
\t\t\t\t\t\t\"sInfoPostFix\": \"\",
\t\t\t\t\t\t\"sSearch\": \"Buscar:\",
\t\t\t\t\t\t\"sUrl\": \"\",
\t\t\t\t\t\t\"sInfoThousands\": \",\",
\t\t\t\t\t\t\"sLoadingRecords\": \"Cargando...\",
\t\t\t\t\t\t\"oPaginate\": {
\t\t\t\t\t\t\t\"sFirst\": \"Primero\",
\t\t\t\t\t\t\t\"sLast\": \"Último\",
\t\t\t\t\t\t\t\"sNext\": \"Siguiente\",
\t\t\t\t\t\t\t\"sPrevious\": \"Anterior\"
\t\t\t\t\t\t},
\t\t\t\t\t\t\"oAria\": {
\t\t\t\t\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",
\t\t\t\t\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t});
\t\t\t}
\t\t});
\t\tvar idioma_español = {
\t\t\t\"sProcessing\": \"Procesando...\",
\t\t\t\"sLengthMenu\": \"Mostrar _MENU_ registros\",
\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",
\t\t\t\"sEmptyTable\": \"Ningún dato disponible en esta tabla\",
\t\t\t\"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros\",
\t\t\t\"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0 registros\",
\t\t\t\"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",
\t\t\t\"sInfoPostFix\": \"\",
\t\t\t\"sSearch\": \"Buscar:\",
\t\t\t\"sUrl\": \"\",
\t\t\t\"sInfoThousands\": \",\",
\t\t\t\"sLoadingRecords\": \"Cargando...\",
\t\t\t\"oPaginate\": {
\t\t\t\t\"sFirst\": \"Primero\",
\t\t\t\t\"sLast\": \"Último\",
\t\t\t\t\"sNext\": \"Siguiente\",
\t\t\t\t\"sPrevious\": \"Anterior\"
\t\t\t},
\t\t\t\"oAria\": {
\t\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",
\t\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"
\t\t\t}
\t\t};
\t\t\$(\"input[type='search']\").css(\"border\", \"1px solid #ccc\");
\t</script>
\t<script>
\t
\t function register()
\t {
\t var password = \$('#password').val();
\t var passwordc = \$('#confirm_password').val();
\t var email = \$('#email').val();
\t var name = \$('#name').val();
\t var regex = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))\$/;
\t
\$('#email_incorrect').hide();
if(name == '' || password == '' || passwordc == '' || email == '' || name == '')
\t {
\t \$('#form_incorrect').show();
\t return false;
\t }else if(! regex.test(email)){
\$('#form_incorrect').hide();
\$('#email_incorrect').show();
return false;
}
\t
\t \$('#form_incorrect').hide();
\t
\t var saveButton = document.getElementById(\"btn-register\");
\t saveButton.setAttribute(\"disabled\", true);
\t saveButton.innerHTML = \"<span class='fa fa-spinner fa-spin' role='status'></span> Cargando...\";
\t
\t if(password != passwordc){
\t \$('#password_incorrect').show();
\t return false;
\t }
\t
\t //validamos cuenta
\t
\t validarEmail(email);
\t
\t
\t
\t }
\t
\t function validarPassword(){
\t var password = \$('#password').val();
\t var passwordc = \$('#confirm_password').val();
\t if(password != passwordc){
\t \$('#password_incorrect').show();
\t }else{
\t \$('#password_incorrect').hide();
\t }
\t }
\t
\t
\t
\t function validarEmail(email)
\t {
\t\t
\t var url = \"{{path('frontend_register_validate', {slug:slug})}}\";
\t
\t var data = {
\t email: email
\t };
\t
\t var saveButton = document.getElementById(\"btn-register\");
\t
\t \$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
\t if(data['resp'] == 'error'){
\t \$('#email_exist').show();
\t saveButton.removeAttribute(\"disabled\");
\t saveButton.innerHTML = \"Guardar\";
\t return false;
\t }else{
\t //saveButton.removeAttribute(\"disabled\");
\t //saveButton.innerHTML = \"Guardar\";
\t \$('#email_exist').hide();
\t saveAccount();
\t //return true;
\t }
\t
\t
\t },
\t error: function(data){
\t console.log(data);
\t }
\t });
\t
\t }
\t
\t function saveAccount()
\t {
\t
\t var url = \"{{path('frontend_register_customer', {slug:slug})}}\";
\t
\t var password = \$('#password').val();
\t var email = \$('#email').val();
\t var name = \$('#name').val();
\t var autologin = true;//\$('#autologin').val();
\t var saveButton = document.getElementById(\"btn-register\");
\t var data = {
\t\t\t\t_username: email,
\t\t\t\t_password: password,
\t\t\t\t_name: name,
\t\t\t\t_autologin: autologin
\t };
\t
\t \$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
\t
\t if(data['resp'] == 'exito')
\t\t\t\t\t{
\t //\$('#success_alert').show();
\t
if(autologin == true)
\t\t\t\t\t\t {
autoLogin(email, password);
}else{
window.location.href = window.location.href;
}
\t }else{
\t\t\t\t\t\tsaveButton.removeAttribute(\"disabled\");
\t saveButton.innerHTML = \"Guardar\";
\t \$('#danger_alert').show();
\t }
\t
\t },
\t error: function(data){
\t console.log(data);
\t }
\t });
\t }
function autoLogin(email, password)
\t\t\t{
\t\t\t\t\$('#_xEmail').val(email);
\t\t\t\t\$('#_xData').val(password);
\t\t\t\t\$('#loginForm').submit();
/*var url = \"{{path('frontend_customer_login', {slug:slug})}}\";
var data = {
\t\t\t\t\t_username: email,
\t\t\t\t\t_password: password,
\t\t\t\t\tautologin: true
\t \t};
\$.ajax({
\t type:'POST',
\t url: url,
\t data: data,
\t success:function(data){
window.location.href = window.location.href;
\t\t\t\t\t},
\t\t\t\t\terror: function(data){
\t\t\t\t\t\tconsole.log(data);
\t\t\t\t\t}
\t \t}); */
}
\t</script>
\t
\t<script>
\t
\t//Refrescar la carretilla en cuanto se abra la pagina\t
\tvar data = {};
\tvar url = \"{{ path('frontend_store_product', {slug:slug}) }}\";
\t\$.ajax({ type: \"POST\",
\t url: url,
\t async: false,
\t data: data,
\t success : function(data)
\t {
\t \t\$('.cart_container').html(data.html);\t
\t }
\t});
\tfunction hideModal1()
\t{
\t\t\$('.js-hide-modal1').on('click',function()
\t\t{
\t\t\t\$('.wrap-modal1').removeClass(\"show-modal1\");
\t\t});
\t}
\t
\tfunction closeModal()
\t{
\t\t\$('.wrap-modal1').removeClass(\"show-modal1\");
\t}
\t
\t
\t{% if productCategory != \"\" %}
\t\t//loadCategory(1,\"{{productCategory}}\",\"{{pager_limit}}\");\t\t
\t\tloadCategory(1,\"{{productCategory}}\",\"10\");\t\t
\t{% else %}
{%if brand != '' and category !='' %}
//loadCategory(5,'{{brand}}',\"{{pager_limit}}\",\"{{globalSearch}}\", \"{{category}}\");
\t\t\t\tloadCategory(5,'{{brand}}',\"10\",\"{{globalSearch}}\", \"{{category}}\");
{% else %}
{% if category != '' %}
//loadCategory(3,\"{{category}}\",\"{{pager_limit}}\",\"{{globalSearch}}\");
\t\t\t\t\tloadCategory(3,\"{{category}}\",\"10\",\"{{globalSearch}}\");
{% elseif category == '' and brand == '' %}
//loadCategory(0,'',\"{{pager_limit}}\",\"{{globalSearch}}\");
\t\t\t\t\tloadCategory(0,'',\"10\",\"{{globalSearch}}\");
{% endif %}
{% if brand != '' %}
//loadCategory(4,'{{brand}}',\"{{pager_limit}}\",\"{{globalSearch}}\");
\t\t\t\t\tloadCategory(4,'{{brand}}',\"10\",\"{{globalSearch}}\");
{% endif %}
{% endif %}
\t{% endif %}
\t
\t\$(document).on('show.bs.modal', '.modal', function()
\t{
\t\t
\t var zIndex = 10000 + (10 * \$('.modal:visible').length);
\t \$(this).css('z-index', zIndex);
\t setTimeout(function() {
\t \$('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
\t }, 0);
\t
\t});
\t
\tfunction loadCategory(type,token,limit = false,search=\"\", token2 = \"\")
\t{
\t\t
\t\tvar url = \"{{ path('frontend_get_product', {slug:slug}) }}\";
\t\t
\t\tvar data = {
\t\t\ttype: type,
\t\t\ttoken: token,
token2: token2,
\t\t\tlimit: limit,
\t\t\tfirst: true,
\t\t\tsearch:search,
\t\t\tisMore: 0
\t\t};
\t\t\t\t
\t\t\$('#pager_label').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\t
\t\t\$('#dynamic_loader').load(url,data,function(a,b)
\t\t{
\t\t\t
\t\t\t\$('#search_field_loader_1').html(\"\");\t\t
\t\t\tif(a == \"\")
\t\t\t{
\t\t\t\t\$('#pager_control').hide();
\t\t\t\t\$('#pager_label').html(\"<h1 style='font-size:100px;margin:0px;'><i class='fa fa-search'></i></h1><h4>No se encontraron resultados...</h4><p>Agregamos productos a nuestro inventario muy frecuentemente.<br>El producto que buscaste podría estar disponible pronto.</p>\");
\t\t\t\t
\t\t\t} else {
\t\t\t\t\$('#pager_control').show();
\t\t\t\tvar total = \$('#total_current_list').val();
\t\t\t\tvar total_filtered = \$('#count_current_list').val();
\t\t\t\t
\t\t\t\tif(parseInt(limit,10) > parseInt(total,10))
\t\t\t\t{
\t\t\t\t\t
\t\t\t\t \$('#pager_label').html(\"Mostrando \"+total_filtered+\" de \"+total+\"<br><p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t\t\t \$('#pager_control').hide();
\t\t\t\t} else {
\t\t\t\t\t\$('#pager_label').html(\"Mostrando \"+limit+\" de \"+total);
\t\t\t\t\t\$('#pager_control').show();\t
\t\t\t\t}
\t\t\t\t
\t\t\t\t\$('#dynamic_loader').addClass('isotope-grid');
\t\t\t\t\$('#pager_control').attr('data-type',type);
\t\t\t\t\$('#pager_control').attr('data-token',token);
\t\t\t\t\$('#pager_control').attr('data-limit',limit);
\t\t\t\t
\t\t\t\t//startSlick();\t
\t\t\t\tstartMagnific();
\t\t\t\thideModal1();
\t\t\t}
\t\t});
\t}\t
\tfunction loadMore()
\t{
\t\t//var newLimit = parseInt(\$('#pager_control').attr('data-limit'))+{{pager_limit}};
\t\tvar newLimit = parseInt(\$('#pager_control').attr('data-limit'))+10;
\t\t\$('#pager_control a').html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\$('#pager_control a').prop(\"disabled\",true);
\t\t
\t\tvar url = \"{{ path('frontend_get_product', {slug:slug}) }}\";
var category = '{{category}}';
\t\tvar data = {
\t\t\ttype: \$('#pager_control').attr('data-type'),
\t\t\ttoken: \$('#pager_control').attr('data-token'),
\t\t\ttoken2: category,
\t\t\t//limit: \$('#pager_control').attr('data-limit')+','+'{{pager_limit}}',
\t\t\tlimit: \$('#pager_control').attr('data-limit')+','+'10',
\t\t\tfirst: false,
\t\t\tisMore: 1\t\t
\t\t};
\t\t
\t\tvar response;
\t\t\$.ajax({ type: \"POST\",
\t\t url: url,
\t\t async: false,
\t\t data: data,
\t\t success : function(text)
\t\t {
\t\t \t
\t\t \t if(text == '')
\t\t \t {
\t\t \t \t\$('#pager_control').html(\"<p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t \t } else {
\t\t\t response = text;
\t\t\t var total = \$('#total_current_list').val();
\t\t\t if(newLimit > total)
\t\t\t {
\t\t\t \t\$('#pager_control').html(\"<p style='text-align:center;color:#ccc;'>~ No hay más que cargar ~</p>\");
\t\t\t \t\$('#pager_label').html(\"Mostrando \"+total+\" de \"+total);
\t\t\t } else {
\t\t\t\t\t\t\$('#pager_label').html(\"Mostrando \"+newLimit+\" de \"+total);\t\t\t \t
\t\t\t }
\t\t\t \$('#pager_control').attr('data-limit',newLimit);
\t\t\t \$('#pager_control a').prop(\"disabled\",false);
\t\t\t \$('#pager_control a').html(\"Cargar más\");
\t\t\t
\t\t\t \$('#dynamic_loader').append(response);
\t\t\t
\t\t\t //startSlick();
\t\t\t \t startMagnific();
\t\t\t \t hideModal1();
\t\t }
\t\t }
\t\t});
\t\t
\t\t
\t\t\t\t
\t}\t
\t
\t
\t
\t\$('#search_field_1').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t\$('#search_field_loader_1').html(\"<i class='fa fa-spin fa-spinner'></i> Buscando...\");
\t\tvar value = \$('#search-product-1').val();\t\t
\t\t//loadCategory(false,false,{{pager_limit}},value);
\t\tloadCategory(false,false,10,value);
\t});
\t
\t
\t\$('#global_search').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t
\t\tvar value = \$('#search').val();
\t\tvar encoded = encodeURIComponent(value).replace(/%20/g,'+');
\t\tvar string_url = \"{{path('frontend_product', {'search':'_ENCODED_', slug:slug})}}\";
\t\tvar location = string_url.replace(\"_ENCODED_\",encoded);
\t\t
\t\twindow.location.href = location;
\t});
\t\t
\t
\tfunction refreshPreview()
\t{
\t\t
\t\tvar url = \"_cart_preview.php\";
\t\tvar data = {};
\t\t\$('#cart_preview').html(\"<div class='row'><div class='col-md-12 text-center'><h1><i class='fa fa-spin fa-spinner'></i></h1></div></div>\");
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(html)
\t\t {
\t\t \t console.log(\"refreshPreviewSuccess\");
\t\t\t \$('#cart_preview').html(html);\t\t\t \t\t\t \t
\t\t }
\t\t});
\t}
\t
\t
\tfunction refreshSideCart()
\t{
\t\t
\t\t\$('.js-panel-cart').addClass('show-header-cart');
\t refreshPreview();
\t}
\t
\tfunction validateStockDirect(stock)
\t{
\t\tvar msg = \"\";
\t\tif(stock == ''){
\t\t\tstock = 0;
\t\t\tmsg = \"El producto no se encuentra disponible\";
\t\t}else{
\t\t\tstock = parseInt(stock,10);
\t\t\tmsg= \"Hay \"+stock+\" unidades disponibles de este producto\";
\t\t\tif(stock == 1){
\t\t\t\t\tmsg= \"Hay 1 unidad disponible de este producto\";
\t\t\t}
\t\t}
\t\t
\t\tif(stock < 1){
\t\t\tswal(\"Oops\", msg);
\t\t\treturn false;
\t\t}else{
\t\t\t\$(\".containerToggle\").toggle()
\t\t}
}
\tfunction increaseInput(pid,oid,stock,preview,checkout = false)
\t{
\t\tif(stock != 'not_stock')
\t\t{
\t\t\t
\t\t\tvar cant = \$('.cartInput'+pid).val();
\t\t\tvar new_cant = parseInt(cant,10)+1;
\t\t\tconsole.log(new_cant);
\t\t\tconsole.log(stock);
\t\t\tvar msg = \"\";
\t\t\tif(stock == '')
\t\t\t{
\t\t\t\tstock = 0;
\t\t\t\tmsg = \"El producto no se encuentra disponible\";
\t\t\t} else {
\t\t\t\tstock = parseInt(stock,10);
\t\t\t\tmsg= \"Hay \"+stock+\" unidades disponibles de este producto\";
\t\t\t
\t\t\t\tif(stock == 1)
\t\t\t\t{
\t\t\t\t\tmsg= \"Hay 1 unidad disponible de este producto\";
\t\t\t\t}
\t\t\t}
\t\t\tif(new_cant > stock)
\t\t\t{
\t\t\t\tswal(\"Oops\", msg);
\t\t\t\treturn false;
\t\t\t}
\t\t}
\t\tif(\$('#main_cart_container').next('div.popover:visible').length == 0)
\t\t{
\t\t\t//Ocultar popover para mobiles
\t\t\tif(window.innerWidth <= 800)
\t\t\t{
\t\t\t
\t\t\t} else {
\t\t\t\t
\t\t\t\tsetTimeout(function()
\t\t\t\t{
\t\t\t\t\t
\t\t\t\t\tvar imgSrc = \$('#cart_picture_for_'+pid).attr('src');
\t\t\t\t\tvar name = \$('#cart_picture_for_'+pid).attr('alt');
\t\t\t\t\tvar imgTag = \"<img style='height:150px;margin:0 auto;' src='\"+imgSrc+\"'>\";
\t\t\t\t\t
\t\t\t\t\t\$('#main_cart_container').popover({
\t\t\t\t\t\thtml:true,
\t\t\t\t\t\tcontainer: 'body',\t\t\t\t \t
\t\t\t\t\t\ttitle: '<i class=\"fa fa-checkmark\"></i> Producto agregado',
\t\t\t\t\t\tcontent:'<div class=\"row\"><div class=\"col-md-12 text-center\">'+imgTag+'</div><div class=\"col-md-12 text-center\">'+name+'</div></div>',
\t\t\t\t\t\tplacement: 'bottom'
\t\t\t\t\t});
\t\t\t\t\t
\t\t\t\t\t\$('#main_cart_container').popover('show');\t
\t\t\t\t\t
\t\t\t\t\tsetTimeout(function()
\t\t\t\t\t{
\t\t\t\t\t\t\$('#main_cart_container').popover('dispose');
\t\t\t\t\t}, 1000);
\t\t\t\t
\t\t\t\t},1000);
\t\t\t}
\t\t}
\t\t
\t\t
\t\t
\t\tvar val = \$('#cartInput'+pid).val();
\t\tvar new_val = parseInt(val)+1;\t\t
\t\t
\t\t\$('.cartInput'+pid).val(new_val);
\t\t\$('#cartInput'+pid).val(new_val);
\t\t
\t\taddToCart(pid,oid,preview,checkout);
\t\t
\t\t\$('#cart_counter_for_'+pid).show();
\t\t\$('#cart_starter_for_'+pid).hide();
\t\t\$('#cart2_counter_for_'+pid).show();
\t\t\$('#cart2_starter_for_'+pid).hide();
\t\t\$('#cart3_counter_for_'+pid).show();
\t\t\$('#cart3_starter_for_'+pid).hide();
\t\t
\t}
\t
\tfunction decreaseInput(pid,oid,preview,checkout = false)
\t{
\t\t
\t\tvar val = \$('#cartInput'+pid).val();
\t\tif(val > 0)
\t\t{
\t\t\tvar new_val = parseInt(val)-1;
\t\t\t
\t\t\t\$('.cartInput'+pid).val(new_val);
\t\t\t\$('#cartInput'+pid).val(new_val);
\t\t\t
\t\t\tif(new_val < 1)
\t\t\t{
\t\t\t\t\$('#cart_counter_for_'+pid).hide();
\t\t\t\t\$('#cart_starter_for_'+pid).show();
\t\t\t\t\$('#cart2_counter_for_'+pid).hide();
\t\t\t\t\$('#cart2_starter_for_'+pid).show();
\t\t\t\t\$('#cart3_counter_for_'+pid).hide();
\t\t\t\t\$('#cart3_starter_for_'+pid).show();
\t\t\t}
\t\t\t
\t\t\taddToCart(pid,oid,preview,checkout);\t\t\t\t\t\t
\t\t}\t
\t}
\t
\t
\tfunction addToCart(pid,oid,preview,checkout = false)
\t{
\t\t
\t\tvar url = \"{{ path('frontend_store_product', {slug: slug}) }}\";
\t\t\$('.cart_container').removeClass(\"animated bounceInRight\");\t\t
\t
\t\tvar data = {
\t\t\tcart: true,
\t\t\toid: oid,
\t\t\tpid: pid,
\t\t\tquantity: \$('#cartInput'+pid).val()
\t\t};\t\t
\t\t
\t\t\$('.cart_container').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\t
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(data)
\t\t {
\t\t\t
\t\t\t var html = data.html;
\t\t \t \$('.cart_container').html(html);
\t\t \t
\t\t \t
\t\t\t \$('.cart_container').addClass(\"animated bounceInDown\");
\t\t\t closeModal();
\t\t\t //refreshSideCart();
\t\t\t if(\$('#cartInput'+pid).val() < 1)
\t\t\t {\t\t\t \t
\t\t\t \t \$('#cart_item_'+pid).remove();
\t\t\t \t \$('#session_quantity_'+pid).html(\"\");
\t\t\t \t \$('#session2_quantity_'+pid).html(\"\");
\t\t\t \t \$('#session3_quantity_'+pid).html(\"\");
\t\t\t } else {
\t\t\t \t \$('#session_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t \t \$('#session2_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t \t \$('#session3_quantity_'+pid).html(\"<div class='quantity_ghost card-2 animated bounceIn'>\"+\$('#cartInput'+pid).val()+\"</div>\");
\t\t\t }\t
\t\t\t
\t\t\t if(preview)
\t\t\t {
\t\t\t \t refreshPreview();
\t\t\t \t {#
\t\t\t \t <?php if(\$thisPage == 55): ?>
\t\t\t\t\trefreshCheckoutTable();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t <?php endif; ?>
\t\t\t\t #}
\t\t\t }\t
\t\t\t
\t\t\t if(checkout)
\t\t\t {
\t\t\t \t refreshCheckoutTable();\t\t\t \t
\t\t\t }\t
\t\t\t
\t\t }
\t\t});
\t\t
\t}\t
\t\t
\t\t
\tfunction removeItemFromCart(key,pid)
\t{
\t\tvar url = \"{{ path('frontend_store_product', {slug:slug}) }}\";
\t\tvar data = {
\t\t\tremove:true,
\t\t\tkey:key
\t\t};
\t\t
\t\t
\t\t\$.ajax({
\t\t type: \"POST\",
\t\t url: url,
\t\t data: data,
\t\t success: function(html)
\t\t {
\t\t \t \$('.cart_container').html(html);
\t\t \t \$('#cart_item_'+pid).remove();
\t\t\t //refreshSideCart();
\t\t\t refreshPreview();
\t\t\t \$('#session_quantity_'+pid).html(\"\");
\t\t\t \$('#session2_quantity_'+pid).html(\"\");
\t\t\t \$('#session3_quantity_'+pid).html(\"\");
\t\t\t {#
\t\t\t <?php if(\$thisPage == 55): ?>
\t\t\t\trefreshCheckoutTable();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t <?php endif; ?>\t
\t\t\t #}
\t\t }
\t\t});
\t\t
\t}\t
\t
\t
\t
\tfunction startFields(cid,type,label,pid)
\t{\t\t\t\t\t\t
\t\tvar url = \"API_____fields.php\";\t\t
\t\tvar data = {
\t\t\tclient_id: cid,
\t\t\tis_web:true,
\t\t\tdata: {
\t\t\t\tdynamic: type,
\t\t\t\tpid:pid\t\t\t\t
\t\t\t}
\t\t};
\t\t
\t\tif(type == 'direct')
\t\t{
\t\t\t\$('#start_direct_'+pid).html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\t\$('#start_direct_'+pid).prop(\"disabled\",true);
\t\t}
\t\t
\t\t
\t\t
\t\t\$.ajax({ type: \"POST\",
\t\t url: url,
\t\t crossDomain: true,
\t\t async: false,
\t\t data: JSON.stringify(data),
\t\t dataType: \"json\",
\t\t success : function(response)
\t\t { \t\t
\t\t \t//\$('#start_direct_'+pid).html(label); \t
\t\t\t\t//\$('#start_direct_'+pid).prop(\"disabled\",false);
\t\t \t var url = \"_fields_convert.php\"
\t\t \t
\t\t \t if(type =='cart')
\t\t \t {\t\t \t \t
\t\t \t\t \$('.fields_cart').load(url,response,function(a)
\t\t\t \t {\t\t\t \t\t\t \t \t\t\t \t
\t\t\t\t\t\t\$('#direct_panel_'+pid).show(\"fast\");
\t\t\t \t });
\t\t \t }
\t\t \t
\t\t \t if(type == 'direct')
\t\t\t\t {
\t\t\t\t \t\$('#start_direct_'+pid).html(\"<i class='fa fa-spin fa-spinner'></i>\");
\t\t\t\t\t\$('#start_direct_'+pid).prop(\"disabled\",true);
\t\t\t\t \t\$('.fields_'+pid).load(url,response,function(a)
\t\t\t \t{
\t\t\t \t \t\$('#direct_start_btn_'+pid).hide();
\t\t\t\t\t\t\$('#direct_panel_'+pid).show(\"fast\");
\t\t\t \t});\t\t\t\t\t
\t\t\t\t }
\t\t\t\t
\t\t\t\t if(type == 'contact')
\t\t\t\t {
\t\t\t\t \t\$('#contact_form_holder_'+label).load(url,response,function(a)
\t\t\t \t{
\t\t\t \t \t
\t\t\t \t});
\t\t\t\t }
\t\t\t\t
\t\t }
\t\t});
\t\t
\t\t
\t}
\t
\t
\t
\tfunction submitDirect(pid)
\t{
\t\t\t\t
\t\tif(!\$('#direct_form_'+pid).parsley().validate())
\t\t{
\t\t\tswal(\"Campos requeridos\", \"Nombre y teléfono son campos requeridos\", \"error\");
\t\t} else {
\t\t\t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",false);
\t\t\t\$('#direct_panel_cnf_btn_'+pid).html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\"); \t\t
\t\t\tvar url = \"_direct_control.php\";\t
\t\t\t
\t\t\t\$.ajax({
\t url: url,
\t type: 'post',
\t dataType: 'json',
\t data: \$('form#direct_form_'+pid).serialize(),
\t success: function(data) {\t \t
\t \tif(data.status == \"success\")
\t \t{\t
\t \t\t\$('#direct_panel_'+pid).hide();\t
\t \t\t\$('#direct_success_'+pid).show();
\t \t\t
\t \t} else {
\t \t\t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",true);
\t \t\t\$('#direct_panel_cnf_btn_'+pid).html(\"Intentar de nuevo\");
\t \t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t \t}
\t\t },
\t\t error: function(data)
\t\t {
\t\t \t\$('#direct_panel_cnf_btn_'+pid).prop(\"disabled\",true);
\t\t\$('#direct_panel_cnf_btn_'+pid).html(\"Intentar de nuevo\");
\t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t\t }
\t \t});
\t}
\t}
\t
\t
\t
\tfunction closeModal(id){
\$('#'+id).modal('hide');
}
\t
\t\$('#contact_form').on('submit',function(e)
\t{
\t\te.preventDefault();
\t\t
\t\t\$('#contact_btn').prop(\"disabled\",true);
\t\t\$('#contact_btn').html(\"<h1><i class='fa fa-spin fa-spinner'></i></h1>\");
\t\tvar url = \"_contact_form.php\";\t
\t\t\t
\t\t\$.ajax({
\t url: url,
\t type: 'post',
\t dataType: 'json',
\t data: \$('form#contact_form').serialize(),
\t success: function(data) {\t \t
\t \tif(data.status == \"success\")
\t \t{\t
\t \t \t\t
\t \t\t\$('#contact_btn_container').html(\"<br><h1 style='text-align:center;'><i class='fa fa-check' style='color:green'></i></h1><h3 style='text-align:center;'>¡Gracias!<br>Hemos recibido el mensaje correctamente. Responderemos muy pronto.</h3>\");
\t \t\t
\t \t} else {
\t \t\t\$('#contact_btn').prop(\"disabled\",false);
\t \t\t\$('#contact_btn').html(\"Intentar de nuevo\");
\t \t\tswal(\"Oops\", \"No se pudo entregar tu mensaje, por favor intenta más tarde.\", \"error\");
\t \t}
\t\t }
\t });
\t
\t});
\t
\t</script>
\t
\t{% block script %}
\t
\t{% endblock %}
\t
\t<!-- CHAT WIDGET -->
{#{ render(controller(\"AppBundle:Frontend/Main:chatWidget\")) }#}
\t{{ render(controller('App\\\\Controller\\\\Frontend\\\\MainController::chatWidgetAction')) }}
<!-- WHATSAPP WIDGET -->
{#{ render(controller(\"AppBundle:Frontend/Main:whatsappWidget\")) }#}
\t{{ render(controller('App\\\\Controller\\\\Frontend\\\\MainController::whatsappWidgetAction')) }}
</body>", "Frontend/base.html.twig", "/home/sinfilas/public_html/templates/Frontend/base.html.twig");
}
}