Disable default event observers in Magento
Simply set the "type" to "disabled". For example, if there's a default observer set like this:
<?xml version="1.0"?>
<config>
<modules>
<Mage_Reports>
<version>0.7.10</version>
</Mage_Reports>
</modules>
<frontend>
<events>
<wishlist_add_product>
<observers>
<reports>
<class>reports/event_observer</class>
<method>wishlistAddProduct</method>
</reports>
</observers>
</wishlist_add_product>
</events>
</frontend>
</config>
Then you'd use something like this in your extension's config.xml:
<?xml version="1.0"?>
<config>
<modules>
<MyNamespace_MyModule>
<version>0.1.0</version>
</MyNamespace_MyModule>
</modules>
<frontend> <!-- Be careful to use <frontend> like above, <global> would not work -->
<events>
<wishlist_add_product>
<observers>
<reports>
<type>disabled</type>
</reports>
</observers>
</wishlist_add_product>
</events>
</frontend>
</config>
Make sure the scope matches though!
Source: http://www.bubblecode.net/en/2012/01/21/disable-an-event-observer-defined-by-default-in-magento/
Written by Colin O'Dell
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Magento
Authors
Related Tags
#magento
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#