это вот этот кусок кода:
function get_oct_popup_add_to_cart(e) {
$.ajax({
url: "index.php?route=checkout/cart/add",
type: "post",
data: "product_id=" + e + "&quantity=" + ("undefined" != typeof quantity ? quantity : 1),
dataType: "json",
success: function(t) {
if(typeof octYandexEcommerce == 'function') {
octYandexEcommerce(t);
}
t.redirect && (location = t.redirect), t.success && ($.magnificPopup.open({
tLoading: '<img src="catalog/view/theme/oct_luxury/image/ring-alt.svg" />',
items: {
src: "index.php?route=extension/module/oct_popup_add_to_cart&product_id=" + e,
type: "ajax"
},
midClick: !0,
removalDelay: 200
}), $("#cart-total").html(t.total), $("#cart > ul").load("index.php?route=common/cart/info ul li"))
},
success: function(json) {
if (json['success']) {
$('#price_num').html('' + json['total_num'] + '');
}
},
error: function(e, t, i) {
alert(i + "\r\n" + e.statusText + "\r\n" + e.responseText)
}
});
}
я туда добавил:
success: function(json) {
if (json['success']) {
$('#price_num').html('' + json['total_num'] + '');
}
},
и все отлично обновляет цену в блоке <div id="price_num"></div> при добавлении товара в корзину.
но если удалить товар, тогда ничего не происходит, блок естественно не обновляет содержимое... И интересно есть ли тригер (срабатывание события) при удалении товара из корзины