I am implementing a side pannel to sell a customized products. Those products have an add to cart button that unexpectedly follows a different structure to add to cart. Normally all the Product Forms & Add to Cart buttons open the ajax cart updated with the data. This lead me to implement customized script of JS to manage the whole behavior, close the Product Drawer, Open Ajax Cart after adding the cart. The only problem when I fetch in the console log the cart items after clicking on the Add to Cart button it does show the the product is added with Cart Items. However the Cart UI is not updated unless I change the quantity of an exesting item in the cart Item. I would like to know what is the call I need to do to call the update of the UI (that surely change quantity, other add to cart buttons use).
Here is my script: