Lun-Vie 10-21h (no festivos)

My Cart -

0,00
0
There are 0 item(s) in your cart
Subtotal: 0,00

Lun-Vie 10-21h (no festivos)

My Cart -

0,00
0
There are 0 item(s) in your cart
Subtotal: 0,00

My Cart -

0,00
0
There are 0 item(s) in your cart
Subtotal: 0,00
x

¡GRACIAS POR REGISTRARTE!

…un momento…

Gracias, te has registrado!

var selectedLanguage = “es”; var validationMessages = messages[“en”]; if(selectedLanguage) { validationMessages = messages[selectedLanguage]; } window.addEventListener(“load”, function () { var form_container = document.querySelector(`#mailerlite-form_1[data-temp-id=”650fda2268d69″] form`); let submitButton = form_container.querySelector(‘.mailerlite-subscribe-submit’); submitButton.disabled = true; fetch(‘https://vinosdegranada.es/wp-admin/admin-ajax.php’, { method: ‘POST’, headers:{ ‘Content-Type’: ‘application/x-www-form-urlencoded’, }, body: new URLSearchParams({ “action” : “ml_create_nonce”, “ml_nonce” : form_container.querySelector(“input[name=’ml_nonce’]”).value }) }) .then((response) => response.json()) .then((json) => { if(json.success) { form_container.querySelector(“input[name=’ml_nonce’]”).value = json.data.ml_nonce; submitButton.disabled = false; } }) .catch((error) => { console.error(‘Error:’, error); }); form_container.addEventListener(‘submit’, (e) => { e.preventDefault(); let data = new URLSearchParams(new FormData(form_container)).toString(); let validationError = false; Array.from(form_container.elements).forEach((input) => { if(input.type !== ‘hidden’) { if(input.required) { if(input.value == ”) { validationError = true; if(input.nextElementSibling == null) { let error = document.createElement(“span”); error.className = ‘mailerlite-form-error’; error.textContent = validationMessages.required; input.after(error); } } } } }); if(validationError) { return false; } fade.out(form_container.querySelector(‘.mailerlite-subscribe-button-container’), () => { fade.in(form_container.querySelector(‘.mailerlite-form-loader’)); }); fetch(‘https://vinosdegranada.es/wp-admin/admin-ajax.php’, { method: ‘POST’, headers:{ ‘Content-Type’: ‘application/x-www-form-urlencoded’, }, body: data }) .then((response) => { fade.out(form_container.querySelector(‘.mailerlite-form-inputs’), () => { fade.in(form_container.querySelector(‘.mailerlite-form-response’)); }); }) .catch((error) => { console.error(‘Error:’, error); }); }); }, false); var fade = { out: function(el, fn = false) { var fadeOutEffect = setInterval(function () { if (!el.style.opacity) { el.style.opacity = 1; } if (el.style.opacity > 0) { el.style.opacity -= 0.1; } else { el.style.display = ‘none’; clearInterval(fadeOutEffect); } }, 50); if( typeof (fn) == ‘function’) { fn(); } }, in: function(el) { var fadeInEffect = setInterval(function () { if (!el.style.opacity) { el.style.opacity = 0; } if (el.style.opacity < 1) { el.style.opacity = Number(el.style.opacity) + 0.1; } else { el.style.display = 'block'; clearInterval(fadeInEffect); } }, 50); } }

DESCUENTO
de 6€

en tu primera
compra

chico-cata-vino