P
P
Pavel Sidorov2021-08-12 10:15:54
1C-Bitrix
Pavel Sidorov, 2021-08-12 10:15:54

BX.onCustomEvent('OnBasketChange') - why does it take so long to think?

To track the event of adding a product to the cart, I use the add code

BX.onCustomEvent('OnBasketChange');


var ajax = $.ajax({
                type: 'POST',
                url: location.pathname + '?action=ADD2BASKET&id=' + tovar,
                data: {
                  ajax_basket: 'Y',
                  quantity: '1'
                }
              });
              ajax.done(function(data) {
                  BX.onCustomEvent('OnBasketChange');
              });


everything seems to be working, but he thinks for a very long time before updating the basket item counter. Tell me where to dig, or what to fix?
BX.onCustomEvent('OnBasketChange');

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question