Как cделать кнопку быстрого заказа в корзине ST100 через BF502N в Tilda
Traffic Hybrid Bike
SKU: 700.932.98
399
р.
599
р.
The resulting "hybrid" is a general-purpose bike that can tolerate a wide range of riding conditions.

Как cделать кнопку быстрого заказа в корзине ST100 через BF502N в Tilda

1
Создали блок ST100
2
Создали блок BF502N и задали ему ссылку для вызова #popup:forder
Добавили в эту форму поле для ввода в несколько строк с именем productlist
3
Добавляем код в блок Другое - Т123
Библиотека для примера

<style>
.continue-btn {
    background-color: #fff;
    color: #fcb42f;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Roboto',Arial,sans-serif;
    border-radius: 3px;
    text-align: center;
    height: 60px;
    line-height: 60px;
    cursor: pointer;
    transition: background 0.3s;
}
.continue-btn:hover {
    background-color: #fff;
}
</style>

<script>
$( document ).ready(function() {
let popupLink = "#popup:forder";
let recID = ($('div[data-tooltip-hook="'+popupLink+'"]').closest('.t-rec').attr('id')).replace(/[^0-9]/g, '');

$('.t706 .t-form__submit').after("<div class='continue-btn' onclick=' tcart__closeCart(); t702_showPopup("+recID+") '>Купить в один клик</div>");

let productlist = $('textarea[name="productlist"]');
productlist.closest('.t-input-group').hide();

$('.t706').on('click','.continue-btn',function(e){
    let prList = "";
    $('.t706__product').each(function(index){
        
        let title = $(this).find('.t706__product-title a').text();
        let sku = $(this).find('.t706__product-title__option').text();
        let quant = $(this).find('.t706__product-quantity').text();
        let amount = $(this).find('.t706__product-amount').text();
        prList += `${index+1}. ${title} -- Артикул: ${sku} -- Кол-во: ${quant} шт  -- Стоимость: ${amount} \n`;    
    });
    productlist.val(prList);
});
});
</script>
Made on
Tilda