Кажется скрипт должен быть таким. В отладчике в корзинку добавило
$('#button-cart').on('click', function () {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('.product_page-left input[type=\'text\'], .product_page-left input[type=\'hidden\'], .product_page-left input[type=\'radio\']:checked, .product_page-left input[type=\'checkbox\']:checked, .product_page-left select, .product_page-left textarea'),
dataType: 'json',
beforeSend: function () {
$('#button-cart').button('loading');
},
complete: function () {
$('#button-cart').button('reset');
},
success: function (json) {
clearTimeout(timer);
$('.alert, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['error']) {
if (json['error']['option']) {
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>');
}
}
}
if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}
if (json['error']['quantity']){
$('#content').parent().before('<div class="alert alert-danger"><i class="material-design-cancel19"></i>' + json['error']['quantity'] + ' <button type="button" class="close material-design-close47"></button> </div>');
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}
if (json['success']) {
$('#content').parent().before('<div class="alert alert-success"><i class="material-design-verification24"></i> ' + json['success'] + '<button type="button" class="close material-design-close47"></button></div>');
$('#cart-total').html(json['total']);
$('#cart-total2').html(json['total2']);
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
timer = setTimeout(function () {
$('.alert').addClass('fadeOut');
}, 4000)
}
});
});