<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>