10% offerts !
Boutiques
Mon espace
France (€)
Mon espace
Mon panier
Essayez cadeau, parfum, kit barbe.
Essayez cadeau, parfum, kit barbe Horace vous aidera!
Kit Intégral Visage
Hydratant Visage Matifiant SPF30
Voir plus
Mon panier
En cours de chargement
`; document.querySelector('#container--banner-cart-drawer .swiper-wrapper').insertAdjacentHTML('beforeend', bannerItem); }); this.swiper = new Swiper("#container--banner-cart-drawer", { loop: true, observer: true, observeParents: true, autoplay: true, pagination: { el: '.swiper-pagination', }, }); } }, initUpsell: function initUpsell(data) { if (data.cart) { if(data.cart.upsell_shipping && data.cart.upsell_shipping_id) { this.upsellSteps.push(data.cart.upsell_shipping_minimimum_amount); } if(Object.values(data.cart.stepcart_steps) && Object.values(data.cart.stepcart_steps).length > 0) { Object.entries(data.cart.stepcart_steps).forEach(([key, value]) => { this.upsellSteps.push(parseInt(value.minimum_amount)) }) } } }, displayUpsellPercentage(cart, minimumAmount, type, step) { let cssTransitionTimeout = 1000; let cartPhysical = this.cart.prices.physical_amount.value; let cartPhysicalValueWithDiscount = cartPhysical.amount - cartPhysical.discount; let previousMinAmount = 0; let previousUpsell = this.currentUpsell; if(type === 'gifts') { previousMinAmount = this.upsellSteps[step]; this.currentUpsell = parseInt(step) + 1; } else { this.currentUpsell = 0; } let newCartValue = cartPhysicalValueWithDiscount - previousMinAmount; let newStepValue = minimumAmount - previousMinAmount; let percentage = (newCartValue / newStepValue) * 100; this.upsellPercentage = (percentage > 100) ? 100 : percentage; if(this.currentUpsell > previousUpsell) { document.getElementById('upsellshipping-progressbar').style.width = '100%'; document.getElementById('upsellshipping-progressbar').classList.add('complete'); setTimeout(() => { document.getElementById('upsellshipping-progressbar').style.right = 0; document.getElementById('upsellshipping-progressbar').style.left = 'auto'; document.getElementById('upsellshipping-progressbar').style.width = '0%'; }, cssTransitionTimeout); setTimeout(() => { document.getElementById('upsellshipping-progressbar').classList.remove('complete'); document.getElementById('upsellshipping-progressbar').style.right = 'auto'; document.getElementById('upsellshipping-progressbar').style.left = 0; document.getElementById('upsellshipping-progressbar').style.width = this.upsellPercentage + '%'; }, cssTransitionTimeout * 2) } else if(previousUpsell > this.currentUpsell) { document.getElementById('upsellshipping-progressbar').style.width = '0%'; document.getElementById('upsellshipping-progressbar').classList.add('back'); setTimeout(() => { if(document.getElementById('upsellshipping-progressbar')) { document.getElementById('upsellshipping-progressbar').style.right = 0; document.getElementById('upsellshipping-progressbar').style.left = 'auto'; document.getElementById('upsellshipping-progressbar').style.width = '100%'; } }, cssTransitionTimeout); setTimeout(() => { if(document.getElementById('upsellshipping-progressbar')) { document.getElementById('upsellshipping-progressbar').classList.remove('back'); document.getElementById('upsellshipping-progressbar').style.right = 'auto'; document.getElementById('upsellshipping-progressbar').style.left = 0; document.getElementById('upsellshipping-progressbar').style.width = this.upsellPercentage + '%'; } }, cssTransitionTimeout * 2) } else { document.getElementById('upsellshipping-progressbar').style.width = this.upsellPercentage + '%'; } }, reloadUpsellShipping: function reloadUpsellShipping(data) { if (data.cart) { if(data.cart.upsell_shipping && data.cart.upsell_shipping_id) { document.getElementById('container--upsell-shipping').style.display = "block"; this.minimumAmount = parseInt(data.cart.upsell_shipping_minimimum_amount ? data.cart.upsell_shipping_minimimum_amount : 0); if (!this.minimumAmount || this.minimumAmount === 0) { this.textFreeShipping = 'Livraison gratuite à partir de 40€'; return; } else { this.textFreeShipping = 'Livraison gratuite à partir de ' + hyva.formatPrice(this.minimumAmount).replace(/,00/g, ''); } let cartPhysical = this.cart.prices.physical_amount.value; let cartPhysicalValueWithDiscount = cartPhysical.amount - cartPhysical.discount; let currentPercent = (cartPhysicalValueWithDiscount / this.minimumAmount) * 100; if(data.cart.subscription_infos && data.cart.subscription_infos.has_product && data.cart.subscription_infos.free_shipping) { currentPercent = 100; } currentPercent = currentPercent > 100 ? 100 : currentPercent; let fullElements = document.getElementsByClassName('upsell-shipping-full'); let leftToSpend = this.minimumAmount - cartPhysicalValueWithDiscount; let elAccroche = document.querySelectorAll('#container--upsell-shipping .accroche')[0]; document.getElementById('upsell-left').innerText = hyva.formatPrice(leftToSpend).replace(/,00|.00/g, ''); document.getElementById('left-to-spend').style.display = 'none'; if(!elAccroche.classList.contains('animated')) { elAccroche.classList.add('animated'); } elAccroche.classList.add('animate-fadeInRight'); elAccroche.classList.remove('animate-fadeInLeft'); Array.from(fullElements).forEach(function(elem) { elem.style.display = 'inline-block'; }); if(!data.cart.subscription_infos.has_product || !data.cart.subscription_infos.free_shipping) { document.getElementById('free-shipping-text').classList.remove('hidden'); document.getElementById('free-shipping-text').classList.add('flex'); } if (currentPercent < 100) { this.displayUpsellPercentage(data.cart, this.minimumAmount, 'shipping', 0); document.getElementById('left-to-spend').style.display = 'inline-block'; if(!elAccroche.classList.contains('animated')) { elAccroche.classList.add('animated'); } elAccroche.classList.add('animate-fadeInLeft'); elAccroche.classList.remove('animate-fadeInRight'); Array.from(fullElements).forEach(function(elem) { elem.style.display = 'none'; }); if(!data.cart.subscription_infos.has_product || !data.cart.subscription_infos.free_shipping) { document.getElementById('free-shipping-text').classList.remove('flex'); document.getElementById('free-shipping-text').classList.add('hidden'); } document.getElementById('left-to-spend-for-gift').classList.add('hidden'); document.getElementById('congrats-for-gift').classList.add('hidden'); } else { if(Object.values(data.cart.stepcart_steps) && Object.values(data.cart.stepcart_steps).length > 0) { let stepcart = data.cart.stepcart_steps; let leftToSpendForGift = 0; let currentMinimumAmountForGift = 0; let shouldSkip = false; let getAllGifts = false; let AllStepsUnlock = false; let leftSpendGiftText = ''; Object.entries(stepcart).forEach(([key, value]) => { if(shouldSkip) { return; } if(value.used === false) { leftToSpendForGift = value.minimum_amount - cartPhysicalValueWithDiscount; currentMinimumAmountForGift = value.minimum_amount; leftSpendGiftText = value.left_to_spend_text; shouldSkip = true; this.displayUpsellPercentage(data.cart, currentMinimumAmountForGift, 'gifts', key); } }); Object.entries(stepcart).forEach(([key, value]) => { getAllGifts = value.used === true; AllStepsUnlock = cartPhysicalValueWithDiscount >= value.minimum_amount; }); if(getAllGifts) { if(document.getElementById('upsellshipping-progressbar')) { document.getElementById('upsellshipping-progressbar').style.right = 0; document.getElementById('upsellshipping-progressbar').style.left = 'auto'; document.getElementById('upsellshipping-progressbar').style.width = '100%'; } } if(getAllGifts || AllStepsUnlock) { document.getElementById('congrats-for-gift').classList.remove('hidden'); } if(leftToSpendForGift > 0) { if(currentMinimumAmountForGift > 0) { let currentPercentGift = (cartPhysicalValueWithDiscount / currentMinimumAmountForGift) * 100; } document.getElementById('left-to-spend-for-gift').classList.remove('hidden'); document.getElementById('congrats-for-gift').classList.add('hidden'); document.getElementById('upsell-left-to-spend-for-gift').innerText = hyva.formatPrice(leftToSpendForGift).replace(/,00|.00/g, ''); document.getElementById('text-left-to-spend-for-gift').innerText = leftSpendGiftText; } else if(0 >= leftToSpendForGift && !getAllGifts) { document.getElementById('left-to-spend-for-gift').classList.add('hidden'); document.getElementById('text-congrats-gift').innerHTML = 'Vous bénéficiez d'un cadeau offert !'; document.getElementById('congrats-for-gift').classList.remove('hidden'); } if(getAllGifts || AllStepsUnlock) { document.getElementById('left-to-spend-for-gift').classList.add('hidden'); } if(getAllGifts) { document.getElementById('text-congrats-gift').innerHTML = 'Vous bénéficiez de tous les produits offerts !'; } Array.from(fullElements).forEach(function(elem) { elem.style.display = 'none'; }); } else { document.getElementById('left-to-spend-for-gift').classList.add('hidden'); document.getElementById('congrats-for-gift').classList.add('hidden'); this.displayUpsellPercentage(data.cart, this.minimumAmount, 'shipping', 0); } } this.completeCongratulationsSentence = data.cart.upsell_shipping_sentence['complete-congratulations']; this.completeSentence = data.cart.upsell_shipping_sentence['complete']; this.leftToSpend = data.cart.upsell_shipping_sentence['left-to-spend']; } else { document.getElementById('container--upsell-shipping').style.display = "none"; this.textFreeShipping = 'Livraison gratuite à partir de 40€'; } } }, eventListeners: { ['@reload-customer-section-data.window'](event) { let that = this; setTimeout(function() { that.reloadUpsellShipping(event); }, 500); } } } }Encore
Encore
Félicitations !Vous bénéficiez de tous les produits offerts !
Mon diagnosticComprendre le prix
Comment est calculée ma réduction?
Plus votre routine sera complète, plus la réduction sera importante. En somme, plus vous achetez, plus vous économisez!
Voir le contenu du kit
|
En savoir plus
Offre limitée : Une brosse à barbe offerte !
Ces produits sont faits pour vous.
Votre panier est vide
Vous avez le pouvoir de changer cela.
Frais de livraison estimés
Offerts - tous les 3 mois
Frais de livraison estimés
Offert
Remises
Un code promo ?+-
Annuler
Utiliser mes crédits
Crédits utilisés ()Modifier
-
Vous y êtes presque...
Simplifiez-vous la vie en vous abonnant
Connectez-vous pour gérer votre abonnement en 1 clic. Créez votre compte en 1 minute si vous n'en avez pas.
Créer un compte
Ou
S'il y a un compte associé avec cet email, vous recevrez un email avec un lien pour réinitialiser votre mot de passe.
Cliquez sur le bouton ci-dessous pour vous connecter.