Update / Trigger Query

Hello friends

I am now desperately asking but I wanted to try my luck once more.

I made my own side cart popup. I am pulling the cart items with Query Loop. And as explained in the document. Everything is as it should be.

When the product is added to the cart, I open the popup with bricksOpenPopup function…

My problem is this. When a product is added to the cart, the last added product does not appear in the cart unless the page is refreshed. I think it is because the query is not called again.

As a solution, I looked for a function, ajax, javascript code that could update the Bricks Query loop but I could not find it.

When I try ajax fetch in the popup opening, the cart is completely empty, even if there is a product, it does not appear at all.

I need an expert opinion on this subject.

I tried to find something by following Bricks’ own sidecart but couldn’t find anything.

Do you have any suggestions in mind?

Thanks & regards

(form action is not “xxxx” but only for hiding the domain)

image