I've read through countless posts with similar issues and have made sure I didn't have the same errors.
I'm trying to use the customer_register_success
event to trigger an observer that will fetch an image from Gravatar and save it on my server. The code for saving it to my server works fine, as I've tested it. The issue is the fact that the observer isn't being called when a customer registers.
config.xml
<config>
<modules>
<Namespace_Getavatar>
<version>1.0.0</version>
</Namespace_Getavatar>
</modules>
<global>
<models>
<getavatar>
<class>Namespace_Getavatar_Model</class>
</getavatar>
</models>
<events>
<customer_register_success>
<observers>
<Namespace_Getavatar_Model_Observer>
<type>singleton</type>
<class>Namespace_Getavatar_Model_Observer</class>
<method>setAvatar</method>
</Namespace_Getavatar_Model_Observer>
</observers>
</customer_register_success>
</events>
</global>
Observer.php
class Namespace_Getavatar_Model_Observer {
public function setAvatar(Varien_Event_Observer $observer)
{
//fetching and saving avatar image
}
}
Namespace_Getavatar.xml
<config>
<modules>
<Namespace_Getavatar>
<active>true</active>
<codePool>local</codePool>
</Namespace_Getavatar>
</modules>
</config>
I'm using a username plugin, but I don't think that could interfere with the event itself?