I want to run Javscript once a product has been added to cart (with the script including product info).
The only thing I have tried is
drupal_add_js() but this doesn't seem to work. Ideally I would like it work like
drupal_set_message(), so the script displays on the next page view.
I also need to get this working with removing products from the cart.
EDIT: Well I've discovered that doing the following actually works, but seems dodgy as hell, and would like to find a better way:
Any ideas would be welcomed!