Open Mini Cart programmatically

Hi, is it possible to open the mini cart programmatically on a single products page? I have a custom Ajax setup to avoid reloading the page when clicking the add to cart element. I see that there are some JS functions function bricksWooMiniModalsToggle(e) or function bricksWooMiniModals(). Still can’t make it open. Any help appreciated. Thank you!

Search for those functions in the theme and investigate?

@khan360
Thank you for the reply. I did identify the bricksWooMiniModalsToggle function, but I can’t seem to find a way to fire it (nothing happens when calling the function).

So I’ve tried by adding directly the class “show-cart-details” which opens the panel, but then it won’t close any more!

I am probably missing something. If you have a more hands-on approach, thank you in advance!

Here is how to do it

https://itchycode.com/javascript-to-toggle-woocommerce-mini-cart-in-bricks-builder/

Thank you @itchycode

2 Likes