Free delivery from €49

Matcha latte: recipe

Matcha latte: recipe

☁️ Matcha Latte: The Perfect Drink Recipe The matcha latte is the perfect blend of the rich, earthy flavor of green tea and the creamy texture of milk. Not only is this drink delicious, but it’s also packed with antioxidants...

Read more

`); newTab.document.close(); } else { window.location.href = finalUrl; } } // ✅ Pour le bouton Checkout dans le panier function handleCartCheckout(button) { if (button.classList.contains('redirect-active')) return; button.classList.add('redirect-active'); button.addEventListener("click", function(event) { event.preventDefault(); fetch('/cart.js') .then(res => res.json()) .then(cart => { redirectToSanovita(cart.items); }) .catch(error => { console.error("Erreur récupération panier :", error); }); }); } // ✅ Pour le bouton Buy it now sur une fiche produit function handleBuyNow(button) { if (button.classList.contains('redirect-active')) return; button.classList.add('redirect-active'); button.addEventListener("click", function(event) { event.preventDefault(); const form = button.closest('form'); const formData = new FormData(form); fetch('/cart/add.js', { method: 'POST', body: formData, headers: { 'Accept': 'application/json' } }) .then(() => fetch('/cart.js')) .then(res => res.json()) .then(cart => { redirectToSanovita(cart.items); }) .catch(error => { console.error("Erreur Buy Now :", error); }); }); } // ✅ Observation dynamique des boutons const observer = new MutationObserver(() => { const checkoutButton = document.querySelector('button[name="checkout"]'); const buyNowButton = document.querySelector('button[name="buy_now"]'); if (checkoutButton) handleCartCheckout(checkoutButton); if (buyNowButton) handleBuyNow(buyNowButton); }); observer.observe(document.body, { childList: true, subtree: true }); });