Issues with VTEX Legacy CMS Events

Hey everyone, I’m developing a function that should run on the Product page after the customer adds a product to the cart (I’m using the <vtex.cmc:BuyInPage /> control). From my research, I understood that one approach would be to use the orderFormUpdated.vtex event, but it didn’t work.

In my initial test, I just wanted to display a log in the console. But nothing happened.

Just for context, my idea is to update some components on the screen after the product is added to the cart.

window.addEventListener('orderFormUpdated.vtex', function(e, orderForm) {
    console.log(orderForm)
    console.log('product added!')
})

https://github.com/vtex/vtex.js/blob/master/docs/checkout/README.md