Personnalisez votre Coffret Découverte Saveur au choix
{
console.log('EVENT', $event.detail)
variant_id = $event.detail.variantId;
let selectors = document.querySelectorAll('button.selector');
selectors.forEach(selector => {
selector.classList.remove('active');
$event.target.classList.add('active');
document.querySelectorAll('button.selector_'+variant_id).forEach(variantSelector => {
variantSelector.classList.add('active');
});
})
let variantSlide = window.theme.productSwiper.slides.filter(slide => slide.dataset.variant === variant_id);
if(variantSlide.length > 0) {window.theme.productSwiper.slideToLoop(variantSlide[0].dataset.swiperSlideIndex, 0, false)}
price = (price/100).toFixed(2)+' €';
was_price = (was_price/100).toFixed(2)+' €';
subscription_price = (subscription_price/100).toFixed(2)+' €';
subscription_discount = (subscription_discount/100).toFixed(2)+' €';
})
"
class="product__info-wrapper"
>
/