Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 2 of 3
Event dispatch requests
 
winans_fred
Sr. Member
 
Avatar
Total Posts:  79
Joined:  2007-09-06
Easthampton, MA
 

Good point, smckeon.  I wasn’t considering it from that angle but that is quite true.  Thanks for the input!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beecoop Cooperative
Jr. Member
 
Total Posts:  1
Joined:  2008-05-13
 

Would be good to have these two events dispatched:

Mage::dispatchEvent('newsletter_customer_unsubscribed', array('customer'=>$customer'email'=>$email)); 
Mage::dispatchEvent('newsletter_customer_subscribed', array('customer'=>$customer'email'=>$email));

 
Magento Community Magento Community
Magento Community
Magento Community
 
jshirkey
Jr. Member
 
Total Posts:  12
Joined:  2008-06-20
Charlottesville, VA
 

I would like to see the following event dispatch added to the core code in the dispatch() method of Mage_Core_Controller_Varien_Front:

public function dispatch()
{
    
...
    while (!
$request->isDispatched() && $i++<100{
        
foreach ($this->_routers as $router{
            
            Mage
::dispatchEvent('controller_front_dispatch_router_match_before', array('router'=>$router));
            
            if (
$router->match($this->getRequest())) {
                
break;
            
}
        }
    }
    
if ($i>100{
        Mage
::throwException('Front controller reached 100 router match iterations');
    
}
     
...
 
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
vinai-kung
Sr. Member
 
Avatar
Total Posts:  84
Joined:  2008-04-04
Heidelberg, Germany
 

This event would come in very hand right now:

Mage::dispatchEvent('catalog_product_collection_load_before', array('collection' => $collection));

This would provide the possibility to add filters to the collection before it is loaded.

EDIT: just found catalog_block_product_list_collection

 
Magento Community Magento Community
Magento Community
Magento Community
 
p3
Jr. Member
 
Total Posts:  2
Joined:  2007-10-04
Lahti
 

Mage::dispatchEvent('sales_order_status_change_before', array('order' => $order'status_before' =>$status_before$status_after => $status_after)); 
Mage::dispatchEvent('sales_order_status_change_after', array('order' => $order'status_before' => $status_before$status_after => $status_after));

Or something similar. Currently it is possible to make observer for sales_order_save_before or sales_order_save_after, but with these I could write a bit less code in the event (no need to check the whole status history, I would get the relevant parts directly from the event object). To make these useful, these need to have the status_before (status where the order is before change) and status_after (status where order is after change). Otherwise I need to do almost the same amount of work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
massi
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-04-13
Munich, Germany
 

* Right before a new registration is saved

Hi,

has this already been implemented? I couldn’t find this event in the Mage core code..

Best regards

 Signature 

vianetz.com
Check out Live Authentication For Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mad Martigan
Member
 
Total Posts:  44
Joined:  2008-08-17
Medford, OR USA
 

Trying to figure out how to update page HTML via an observer. 

I’ve got my new observer to function correctly, but now I need to return some text to the html page.  (tracking code for the iDevAffiliate software)

So i guess the question is...: How do I update page HTML via an observer event?

I’m patterning my module after the google analytics module.  It’s a little confusing how the Observer.php method (order_success_page_view) calls the block from Ga.php to get the tracking results back into the page html.  If I can I figure this last part out I’ve got the module just about ready to upload into Magento Connect for others to use.

any help is greatly appreciated.  TIA!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Laurent Bourrel
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2008-06-09
SQLI - Poitiers
 

Hi,

You can find the list of events for the v1.1.6 :
http://www.magentocommerce.com/wiki/customizing_magento_using_event-observer_method#events

 
Magento Community Magento Community
Magento Community
Magento Community
 
massi
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-04-13
Munich, Germany
 

Unfortunately there isn’t any list in the link posted below.

 Signature 

vianetz.com
Check out Live Authentication For Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Laurent Bourrel
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2008-06-09
SQLI - Poitiers
 

You should download the xls file at the bottom of the page…

Here is the link :

http://www.magentocommerce.com/wiki/_media/magento_events_1.1.6.xls?id=customizing_magento_using_event-observer_method

 
Magento Community Magento Community
Magento Community
Magento Community
 
massi
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-04-13
Munich, Germany
 

Ah funny, it seems to be a bug in my browser (IE7) because I cannot see any icon or text link..

Thank you very much.

Image Attachments
observer_events.jpg
 Signature 

vianetz.com
Check out Live Authentication For Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Laurent Bourrel
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2008-06-09
SQLI - Poitiers
 

wow !

So, I just added the link for IE user. Really, it’s a funny bug !

Thanks for the comment, I hope the file will help you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
petemcw
Jr. Member
 
Total Posts:  16
Joined:  2007-08-31
 

I am working on integrating a client’s Magento store with a 3rd party service.  When an order is successfully placed (paid via CC, so funds are captured) I would like to send the order details to the 3rd party.

Any suggestions on which would be to most appropriate event to trigger this?
Ideas:

checkout_onepage_controller_success_action
checkout_type_onepage_save_order_after
sales_order_save_after

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mad Martigan
Member
 
Total Posts:  44
Joined:  2008-08-17
Medford, OR USA
 

I would use

checkout_onepage_controller_success_action

That is the same even Varian uses in their googleanalytics module for recording a sales event.

 
Magento Community Magento Community
Magento Community
Magento Community
 
petemcw
Jr. Member
 
Total Posts:  16
Joined:  2007-08-31
 

Thanks so much for the suggestion!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 3
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
52283 users|600 users currently online|105601 forum posts