I am learning observers and events, but following a simple event, i am unable to disect the problem, as to me it seems fine, and nothing in system.log as well. Following is my module etc/config.xml
<config> <global> <models> <csv> <class>Training_Csv_Model</class> </csv> </models> <events> <customer_login> <observers> <csv> <type>model</type> <class>csv/observer</class> <method>logCSV</method> </csv> </observers> </customer_login> </events> </global> </config>
while my observer.php file is under Name_space/module_name/Model/Observer.php and has following code
class Training_Csv_Model_Observer{ public function logCSV($observer){ $customer = $observer->getCustomer(); Mage::log($customer->getName()." has logged in", null, "customer.log"); } }
I am unable to understand why this wouldn't work, as a simple Model would work, meaning my module is working and loading. My knowledge of PHP is limited and i want to know, why this won't work.