Let's say we have a list of wrenches:


I'm trying to find the predispatch event handler for the Catalog's product list page so that I can sanitize the 'order' parameter's input before it is sent to the controller.

I'm new to magento and have been having trouble finding it.

Where is it?

1 Answer 1


Short answer: After some digging I found that there wasn't a predispatch handler already defined in my config.xml file for the page I cited (Catalog Category View) so I had to create one.

Longer answer: I consulted 'Phparchitect's Guide to E-Commerce Programming with Magento' which has a section that lists the syntax of predispatch events you can listen for, namely:




I plugged in my module, controller, and action names (Catalog/Category/View) and created a new handle in config.xml, which also specified an Obserfer class and a method like so:


Afterward, I navigated to the Observer class and created a new method with the method name specified above. Using my debug log I was able to detect this method being hit upon loading the page again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.