<script>
document.addEventListener("DOMContentLoaded", function() {
    (function () {
        
        const welcomeTxt = 'Здравствуйте, ребята! Я подтерждаю свой заказ, но хочу оплатить позже. Пришлите ссылку перед отправлением. Заказ этот:';
        const welcomeTxt2 = 'Zdravstvujte, rebyata! Ya podtverzhdayu svoj zakaz, no hochu oplatit pozzhe. Prishlite ssylku pered otpravleniem. Moi kontakty:';
        
        const productName = 'Подписка BASE';
        const  productPrice = 6790;
        const qwestTxt = ['Вид подписки','Периодичность','Стартовый набор','Размер верха','Размер низа','Размер стопы'];
        const answersData = [];
        let productBlock = '';
        
        let personName = '';
        let personEmail = '';
        let phoneShort = '';
        let phoneFull = '';
        
        const quizBlock = document.querySelector('.uc-quiz-content');
        
        if(quizBlock!=null){
            
            const submitBtn = quizBlock.querySelector('.t-quiz__btn_submit');

            document.addEventListener('click', function(event) { 
                if(event.target.closest('.uc-quiz-content .t-quiz__btn_submit')) collectQuizAnswers();
            });
            
            let waButton = quizBlock.querySelector('a[href*="api.whatsapp"]');
            let waFirstLink = '';
            if(waButton!=null) waFirstLink = waButton.getAttribute('href');
            
            let tgButton = quizBlock.querySelector('a[href*="//t.me/"]');
            let tgFirstLink = '';
            if(tgButton!=null) tgFirstLink = tgButton.getAttribute('href');
            
            
            function collectQuizAnswers(){
                
                const stepsQuiz = quizBlock.querySelectorAll('.t-quiz__screen-wrapper:not(.t-quiz__contact-form)');
                
                for(let i=0; i<stepsQuiz.length; i++){
                    
                    let correctStep = false;
                    const hiddenAttr = stepsQuiz[i].hasAttribute("aria-hidden");
                    
                    if(hiddenAttr){
                        if(stepsQuiz[i].getAttribute("aria-hidden")=='false')  correctStep = true; 
                    }else{
                        correctStep = true;
                    };
                    
                    if(correctStep){
                        let answers = '';
                        const group = stepsQuiz[i].querySelector('.t-input-group');
                        if(group!=null){
                            const groupType = group.getAttribute('data-field-radcb');
                            if(groupType=='rb'){
                                answers = stepsQuiz[i].querySelector('input[type="radio"]:checked').value;  
                            };
                            if(groupType=='cb'){
                                const startBoxes = stepsQuiz[i].querySelectorAll('input[type="checkbox"]:checked');
                                let startJoin = '';
                                for(let j=0; j<startBoxes.length; j++){
                                    startJoin+= startBoxes[j].value+';'
                                };
                                answers = startJoin;
                            };
                            answersData.push(answers);
                        };
                    };
                };
                
                personName = quizBlock.querySelector('.t-input-group_nm input').value;
                personEmail = quizBlock.querySelector('.t-input-group_em input').value;
                phoneShort = quizBlock.querySelector('.t-input-group_ph input[type="tel"]').value;
                phoneFull = quizBlock.querySelector('.t-input-group_ph input.js-phonemask-result').value;
                
                //Формируем товар для корзины
                productBlock = document.querySelector('.uc-create-product');
                
                if(productBlock!=null){
                    //Формируем фото товара
                    const imageUrl = quizBlock.querySelector('.t-quiz__screen-wrapper[data-step-index="0"] input[type="radio"]:checked+.t-bgimg').getAttribute('data-original');
                    const productImageElems = productBlock.querySelectorAll('.t-bgimg');
                    for(let j=0; j<productImageElems.length; j++){
                        productImageElems[j].setAttribute('data-original' , imageUrl);
                        productImageElems[j].style.backgroundImage = `url('${imageUrl}')`;
                    };
                            
                    //Название
                    productBlock.querySelector('.js-product-name').textContent = productName;
                    //цена
                    productBlock.querySelector('.js-product-price').setAttribute('data-product-price-def', productPrice);
                    productBlock.querySelector('.js-product-price').setAttribute('data-product-price-def-str', productPrice);
                    productBlock.querySelector('.js-product-price').textContent = productPrice;
                    
                    //Опции
                    const selectWrapper = productBlock.querySelector('.js-product-controls-wrapper');
                    const jsOptions = selectWrapper.querySelectorAll('.js-product-option');
                    const cloneOption = jsOptions[0].cloneNode(true);
                    jsOptions.forEach(function (el, index) {
                        el.remove();  
                    });
                    
                    //Формируем опции и WA LINK и TG LINK
                    let waLink = waFirstLink +'&text='+welcomeTxt;
                    let tgLink = tgFirstLink +'?text='+welcomeTxt;
                    let tgLink2 = tgFirstLink +'?text='+welcomeTxt2;
                    
                    for(let j=0; j<qwestTxt.length; j++){
                        const clone = cloneOption.cloneNode(true);
                        const optionName = qwestTxt[j];
                        clone.querySelector('.js-product-option-name').textContent = optionName;
                        clone.querySelector('option').textContent = answersData[j];
                        clone.querySelector('option').value = answersData[j];
                        selectWrapper.append(clone);
                        
                        waLink += ` ${optionName}:${answersData[j]},`;
                        tgLink += ` ${optionName}:${answersData[j]},`;
                    };
                    
                    waLink += ` Контакты: ${personEmail} ${phoneFull}`;
                    tgLink += ` Контакты: ${personEmail} ${phoneFull}`;
                    tgLink2 += ` ${personEmail} ${phoneFull}`;
                    
                    waButton.setAttribute('href', encodeURI(waLink));
                    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
                        tgButton.setAttribute('href', encodeURI(tgLink));    
                    }else{
                        
                        tgLink2 = tgLink2.replace('(', '');
                        tgLink2 = tgLink2.replace(')', '');
                        
                        tgButton.setAttribute('href', tgLink2);    
                    };
                };
                  
            };
            
            //Нажатие на кнопку купить в квизе
            quizBlock.querySelector('a[href="#send-to-cart"]').addEventListener('click', function(event) {
                
                const cartElement = document.querySelector('.t706');
                
                if(cartElement!=null){
                    
                    cartElement.classList.add('hide-cart' , 'hide-delivery');
                    
                    cartElement.querySelector('.t-input-group_nm input').value = personName;
                    cartElement.querySelector('.t-input-group_em input').value = personEmail;
                    cartElement.querySelector('.t-input-group_ph input[type="tel"]').value = phoneShort;
                    cartElement.querySelector('.t-input-group_ph input.js-phonemask-result').value = phoneFull;
                    
                    deleteProducts();
                    
                    cartElement.querySelector('.t-input-group_dl').remove();
                    
                    const delivElement = document.createElement("div");
                    delivElement.setAttribute('id', 'delivery-services-wrapper');
                    
                    const cartBottom = document.querySelector('.t706__cartwin-bottom');
                    cartBottom.insertAdjacentElement('afterEnd', delivElement);
                    
                    
                    productBlock.querySelector('a[href="#order"]').click();
                    
                    setTimeout(function() {
                        cartElement.querySelector('.t-submit').click();
                    }, 200);
                    
                };
            });
            
            
            function deleteProducts(){
                tcart.products = [];
                tcart__reDrawTotal();
                tcart__reDrawCartIcon();
                tcart__reDrawProducts();
                tcart__saveLocalObj();
            };
            
        };
        
        
        window.myAfterSendedFunction = function (form) {
            document.querySelector('.t706').classList.remove('hide-cart');
        };

        if (document.readyState !== 'loading') {
            us_eventFromCartToPayment();
        } else {
            document.addEventListener('DOMContentLoaded', us_eventFromCartToPayment);
        };

        function us_eventFromCartToPayment() {
            let forms = document.querySelectorAll('.t706 .js-form-proccess');
            if(forms.length){
                Array.prototype.forEach.call(forms, function (form) {
                    form.addEventListener('tildaform:aftersuccess', function () {
                        window.myAfterSendedFunction(form);
                    });
                });
            };
        };
 
    })();    
});    
</script> <style>


#allrecords .uc-quiz-content a[href="#send-to-cart"] {
    background-color: #f54b4b;
    color: #fff;
    padding: 10px 25px;
    border-radius: 3px;
}

#allrecords .uc-quiz-content a[href*="https://api.whatsapp.com"] {
    background-color: #32dd51;
    color: #fff;!;
    padding: 10px 25px;
    border-radius: 3px;
    background-image: url(https://static.tildacdn.com/tild6630-3637-4261-a439-326432346330/Group_2511.png);
    background-size: 35px;
    background-position: 5px center;
    background-repeat: no-repeat;
    padding-left: 40px;
}


#allrecords .uc-quiz-content a[href*="https://t.me/"] {
    background-color: #29aaec;
    color: #fff;
    padding: 10px 25px;
    border-radius: 3px;
    background-image: url(https://static.tildacdn.com/tild3361-3236-4361-a131-663431343236/Group.svg);
    background-size: 24px;
    background-position: 11px center;
    background-repeat: no-repeat;
    padding-left: 42px;
    margin-left: 5px;
}

.hide-cart{
    opacity: 0;
    pointer-events: none;
}

.hide-delivery div#delivery-services-wrapper {
    display: none;
}

    
</style>
Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "Methods and rules that cannot be improved upon have been developed over centuries. To produce perfect books, these rules must be revived and applied." The front matter, or preliminaries, is the first section of a book and typically has the fewest pages. While all pages are counted, page numbers are generally not printed, whether the pages are blank or contain content.
Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "Methods and rules that cannot be improved upon have been developed over centuries. To produce perfect books, these rules must be revived and applied." The front matter, or preliminaries, is the first section of a book and typically has the fewest pages. While all pages are counted, page numbers are generally not printed, whether the pages are blank or contain content.

Подписка BASE за 6790р

Выберите пол
Гендерно-нейтральной одежды у нас нет, поэтому вопрос первый и ключевой
С какой частотой вы хотите получать одежду?
Состав набора будет отображаться в личном кабинете в соответствии с выбранным планом.
Укажите предпочтения по стартовому набору
Мы хотим сделать ваш первый набор максимально соответствующим вашим пожеланиям
*Отметьте один или несколько вариантов
Выберите размер верха
Верх — это всё, что выше пояса (футболки, рубашки и тд)
Григорий Власов Что-то придумал
Выберите последний вариант, если не знаете свой размер. Мы свяжемся с вами и поможем определиться.
Выберите размер низа
Низ — это всё, что ниже пояса (брюки, шорты и тд)
Григорий Власов Что-то придумал
Выберите последний вариант, если не знаете свой размер. Мы свяжемся с вами и поможем определиться.
Выберите размер стопы
Здесь всё, что про ноги (носки, обувь и тд)
Выберите размер верха
Верх — это всё, что выше пояса (футболки, рубашки и тд)
Григорий Власов Что-то придумал
Выберите последний вариант, если не знаете свой размер. Мы свяжемся с вами и поможем определиться.
Выберите размер низа
Низ — это всё, что ниже пояса (брюки, шорты и тд)
Григорий Власов Что-то придумал
Выберите последний вариант, если не знаете свой размер. Мы свяжемся с вами и поможем определиться.
Выберите размер стопы
Здесь всё, что про ноги (носки, обувь и тд)
Немного информации о вас
Номер нужен для связи в редких случаях. Звонить не будем — только сообщения в мессенджерах.
Предпочтительный способ связи
Сегодня дешевле!
Оплатите со скидкой 10% на первое отправление. Всего 6111р вместо 6790р прямо сейчас.

Оплатить

Если вы не имеете возможности оплатить заказ сейчас - запросите резерв скидки в WhatsApp или Telegram:

Whatsapp Telegram

Внимание! Если вы не произведёте оплату сейчас или не забронируете скидку акционная цена может не сохраниться и быть выше.
Made on
Tilda