Mam 2 divy o tym samym ID - #cart-total, po dodaniu do koszyka produktu aktualizowany jest jedynie pierwszy DIV. Co trzeba zrobić żeby były aktualizowane oba divy? Oba divy muszą mieć ten sam ID.
$('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['success']) { $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); });