попробуй изменить код
<button type="button" id="button-cart" data-loading-text="Загрузка..." class="us-product-btn us-product-btn-active" onClick="addCart()">В корзину</button>
это
<script>
$('#button-cart').on('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),
dataType: 'json',
cache: false,
beforeSend: function() {
$('#button-cart').button('loading');
},
complete: function() {
$('#button-cart').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['error']) {
if (json['error']['option']) {
let errorOption = '';
for (i in json['error']['option']) {
var element = $('#input-option' + i.replace('_', '-'));
if (element.parent().hasClass('input-group')) {
element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
} else {
element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
}
errorOption += '<div class="alert-text-item">' + json['error']['option'][i] + '</div>';
}
usNotify('danger', errorOption);
}
if (json['error']['error_warning']) {
usNotify('danger', json['error']['error_warning']);
}
if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}
if (json['success']) {
if (json['isPopup']) {
octPopupCart();
} else {
usNotify('success', json['success']);
}
if(typeof octYandexEcommerce == 'function') {
octYandexEcommerce(json);
}
// Need to set timeout otherwise it wont update the total
setTimeout(function () {
$('#oct-cart-quantity, .header-cart-index, #mobile_cart_index').html(json['total_products']);
$('.us-cart-text').html(json['total_amount']);
}, 100);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
</script>
на это
<script>
function addCart() {
alert('bla-bla-bla');// ну шоб бачити шо все норм.
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),
dataType: 'json',
cache: false,
beforeSend: function() {
$('#button-cart').button('loading');
},
complete: function() {
$('#button-cart').button('reset');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['error']) {
if (json['error']['option']) {
let errorOption = '';
for (i in json['error']['option']) {
var element = $('#input-option' + i.replace('_', '-'));
if (element.parent().hasClass('input-group')) {
element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
} else {
element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
}
errorOption += '<div class="alert-text-item">' + json['error']['option'][i] + '</div>';
}
usNotify('danger', errorOption);
}
if (json['error']['error_warning']) {
usNotify('danger', json['error']['error_warning']);
}
if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}
if (json['success']) {
if (json['isPopup']) {
octPopupCart();
} else {
usNotify('success', json['success']);
}
if(typeof octYandexEcommerce == 'function') {
octYandexEcommerce(json);
}
// Need to set timeout otherwise it wont update the total
setTimeout(function () {
$('#oct-cart-quantity, .header-cart-index, #mobile_cart_index').html(json['total_products']);
$('.us-cart-text').html(json['total_amount']);
}, 100);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
</script>