With the new onCartChanged( ) client-side event your code can listen to changes made to the cart from any page on your site. This includes adding or removing products, as well as changes in quantities.
The changed cart is then returned, allowing you to use it to recommend other products, perform data management, trigger pop-ups, etc.
Note: To ensure the event is triggered when a change to the cart is made on any page, use onCartChanged( ) in the global site code file (masterPage.js). You can also use onCartChanged( ) on any specific page you'd like.
Learn more at https://www.wix.com/corvid/reference/wix-stores/oncartchanged