Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 8 of 8
Event dispatch requests
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

Is there an event after the add to cart button is clicked but before the cart is saved? I need this for validation of product options so I can throw an exception if the validaiton failed.

There is an event after the cart is saved in Mage_Checkout_CartController:

Mage::dispatchEvent('checkout_cart_add_product_complete',
  array(
'product' => $product'request' => $this->getRequest(), 'response' => $this->getResponse())
  );

But I need an event before the cart is saved.  The closest I find is the ‘quote_save_before’ event but this is not ideal as it does not indicate the last added product.

If none is available, I’d like to request for an event ‘checkout_cart_add_product_before’, with the same params as ‘checkout_cart_add_product_complete’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ryan Sun _Kuafu
Guru
 
Total Posts:  317
Joined:  2008-11-14
FL
 

add event dispatcher in
_prepareLayout in Mage_Core_Block_Abstract
and
_prepareCollection in Mage_Adminhtml_Block_Widget_Grid
also add an event prefix
PLEASE!

 
Magento Community Magento Community
Magento Community
Magento Community
 
oharepa
Jr. Member
 
Total Posts:  14
Joined:  2013-09-19
 

Hi all!

I’m trying to write an observer to add data from a custom attribute field from my customer registration page. I know that the event is ‘customer_register_success’ but i don’t know where to go from there. My attribute is membership_number.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 8 of 8