Hi,
I am attempting to write an observer to work with a new donation product I'm creating. It attaches to NOTIFIER_CART_ADD_CART_START, called at the beginning of add_cart in shopping_cart.php. What I want it to do is check and see if the product being added is a donation, and if so remove any previous donations in the cart.
Problem is, I'm unsure how to access the ID of the product that's being added. It's passed to the function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {
The update function, here,
function update(&$class, $eventID) {
gets a reference to the class (in this case the shopping cart) passed in, which allows me to access variables defined in the class. But how do I access the parameters of the function?
Thanks,
Kevin



