I would like to send an email notification to my store's contact email address every time when a new customer has been Registered.
I don't want to purchase any kind of the extensions, so please help me to do this
Thanks in advance
magento
I would like to send an email notification to my store's contact email address every time when a new customer has been Registered.
I don't want to purchase any kind of the extensions, so please help me to do this
Thanks in advance
Best Answer
Best practice is to use Magento's event system.
app/etc/modules/Your_Module.xml
app/core/local/Your/Module/etc/config.xml
app/code/local/Your/Module/Model/Observer.php
EDIT: Note the edit in the code - as AlphaCentauri pointed out, the
customer_save_after
event is fired for both inserts and updates. The_origData
conditional logic should allow you to incorporate his mailing logic. _origData will benull
.