<script>
$(document).ready(function(){
    
$(document).on('DOMSubtreeModified', ".t706__cartwin-totalamount-info", function() {    

setTimeout(function () {
    
    let city = $('input[name="tildadelivery-city"]').val();
    
    let products = tcart.products;
    
    let block = false;
    
    //Ищем товар 18+ в корзине 
    $.each(products , function(index, val) { 
        if( val['pack_label']=='whd') block=true;
    });
    
    $('.product-warning-txt').remove();
    
    //Если в корзине есть товар 18+    
    if(block){
        
        //Если выбран нужный город
        if( city=="Челябинск" ){
     
            $('#delivery-services-wrapper label').hide();//скрываем все доставки
            $('#delivery-services-wrapper label:first').show().click();//Активируем только первую
            $('#delivery-services-wrapper').before('<div class="product-warning-txt t-text"><b>В корзине есть товар 18+</b><br>Возможен только этот вид доставки для этого товара</div>');
        }else{
      
            //Если выбран другой город, то   
            $('#delivery-services-wrapper label').hide();//скрываем все доставки
            $('.t706 .t-form__submit').hide();//скрываем кнопку отправки
            $('#delivery-services-wrapper').before('<div class="product-warning-txt t-text"><b>В корзине есть товар 18+</b><br>Доставка в этот город невозможна</div>');
        };
        
    
    }else{ //Если нет товаров с 18+
        $('#delivery-services-wrapper label').show();//показываем все доставки
        $('.t706 .t-form__submit').show();//показываем кнопку
    };


}, 500);  
    

});


$(document).on("keydown", ".t-form", function(event) {return event.key != "Enter";});

});
</script>

<style>
.product-warning-txt.t-text b {
    color: #ff0000;
    font-size: 22px;
}    
</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 upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed or printed, on either display pages or blank pages.
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 upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed or printed, on either display pages or blank pages.
Made on
Tilda