Config Event Observer Definition (Frontend, Admin & Global)

Updated . Posted . Visible to the public.

Frontend:

<config>
    <frontend>
        <events>
            <the_name_of_the_event_to_observe>
                <observers>
                    <namespace_module>
                        <class>namespace_module/observer</class>
                        <method>someMethod</method>
                    </namespace_module>
                </observers>
            </the_name_of_the_event_to_observe>
        </events>
    </frontend>
</config>

Admin:



<the_name_of_the_event_to_observe>

<namespace_module>
namespace_module/observer
someMethod
</namespace_module>

</the_name_of_the_event_to_observe>


Global (before area has been initialized):

<config>
    <global>
        <events>
            <the_name_of_the_event_to_observe>
                <observers>
                    <namespace_module>
                        <class>namespace_module/observer</class>
                        <method>someMethod</method>
                    </namespace_module>
                </observers>
            </the_name_of_the_event_to_observe>
        </events>
    </global>
</config>
Mike Whitby
Last edit
Mike Whitby
Keywords
config.xml
Posted by Mike Whitby to Magento (2012-02-15 15:39)