My fellow devs!
I am attempting to change the standard "add to cart" functionality to include AJAX. I've taken on board advice that overloading addAction method in the Checkout/CartController.php methods is bad so I am now trying to do it via the events system.
I need to return a JSON response to my AJAX request. The response must have things like grand total, num items etc which I see I can get from the event checkout_cart_save_after (Ln 464 - Checkout/Model/Cart.php) but I cannot access the response object as this event is executed within Model. Event checkout_cart_add_product_complete (Ln 230 - Checkout/controllers/CartController.php) does appear to have access to this so as I see it the logical thing to do would be to share the data between my event handlers.
I've only been using Magento for a few weeks now so does this logic sound correct and can I share this data?