Answer the question
In order to leave comments, you need to log in
How to trigger cart rendering in a new Bitrix template?
The new component template sale.basket.basket is used, with the mustache template engine
.
Answer the question
In order to leave comments, you need to log in
I contacted Bitrix support, as it turned out this file was left as a result of an incorrect template update, and it should not be there,
I also asked how to update the contents of the basket, the answer is as follows
BX.Sale.BasketComponent.sendRequest('refreshAjax', {fullRecalculation: 'Y'});
I did not find a separate method for updating. Can be updated like this:
BX.Sale.BasketComponent.fillTotalBlocks();
for(itemId in BX.Sale.BasketComponent.items){
if(BX.Sale.BasketComponent.items.hasOwnProperty(itemId)){
BX.Sale.BasketComponent.redrawBasketItemNode(itemId);
}
}
Not quite a beautiful way, but in the script for deleting a product from the upper basket, the following code is called
....
reloadTopBasket('', $('#basket_line, #basket_line_fixed, #basket_line_fixed_mobile'), 200, 2000, 'N', $(this ));
...
It works fine for me and the cart is updated without any problems
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question