Friday, September 20, 2013

Magento debug observer functions

If you would like to see your Observer function being available for debugging in the browser,
create a function in your Controller of the module you are using. I called mine testAction(). In there, use the following example:

public function testAction() { $observer = Mage::getModel('something/observer'); print_r($observer->functionname()); //echo 'hello'; }

To call that function in the browser, use something like http://address/something/controllername/test

No comments:

Post a Comment