P
P
photosho2020-05-20 10:49:42
1C-Bitrix
photosho, 2020-05-20 10:49:42

How to add your block to the updated list at the bottom of the cart?

The basket page (sale.basket.basket) in the "basket-total.php" template has its own markup with a value that is updated from Cookie. When updating this lower part, Bitrix somehow caches all its contents except for some dynamic blocks (for example, the cost of goods and the list of coupons).

I need to either add my block to the updated list (so that it is updated along with the price from the "basket-total.php" file), or exclude it from the updated list altogether, so that it is not updated from the cache either. The update from the cache is done in the "/js/component.js" file, in the "fillTotalBlocks()" function:

var totalNodes = this.getEntities(this.getCacheNode(this.ids.basketRoot), 'basket-total-block');


Because now, since my block is not updated by Bitrix itself, I update it on my own through an additional ajax request inside this function. And it turns out that the value from the cache is first restored, and then mine is loaded - crooked and ugly.

Who can offer something about this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GGGVader, 2020-05-20
@GGGVader

You write your component and through ajax you pull what the component returns (html)
This is how Bitrix24 is written

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question