cancel
Showing results for 
Search instead for 
Did you mean: 

event after customer registration

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

event after customer registration

hi,

I have a working module that sets a privacy attribute to customer account. Now I'm trying to write an observer to save that value after a customer registration, but it's not fired. This is my config:

<?xml version="1.0"?>
<config>
    <modules>
        <Hoop_Privacy>
            <version>0.1.0</version>
        </Hoop_Privacy>
    </modules>
    <frontend>
        <events>
            <customer_register_success>
                <observers>
                    <hoop_privacy>
                        <type>singleton</type>
                        <class>hoop_privacy/observer</class>
                        <method>customerRegisterSuccess</method>
                    </hoop_privacy>
                </observers>
            </customer_register_success>
        </events>
    </frontend>
    <global>
        <helpers>
            <privacy>
                <class>Hoop_Privacy_Helper</class>
            </privacy>
        </helpers>
        <models>
            <privacy>
                <class>Hoop_Privacy_Model</class>
                <resourceModel>privacy_mysql4</resourceModel>
            </privacy>
        </models>
        <resources>
            <customerattribute1527753925_setup>
                <setup>
                    <module>Hoop_Privacy</module>
                    <class>Mage_Customer_Model_Entity_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </customerattribute1527753925_setup>
            <customerattribute1527753925_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </customerattribute1527753925_write>
            <customerattribute1527753925_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </customerattribute1527753925_read>
        </resources>
    </global>
</config> 

so I have Observer.php inside /app/code/Hoop/Privacy/Model, but event is not fired at all.

any help?

thanks a lot

1 ACCEPTED SOLUTION

Accepted Solutions

Re: event after customer registration

You need to declare classpath in your observer, replace

<class>hoop_privacy/observer</class> with <class>Hoop_Privacy_Model_Observer</class>

Now,

 

<customer_register_success>
                <observers>
                    <hoop_privacy>
                        <type>singleton</type>
                        <class>Hoop_Privacy_Model_Observer</class>
                        <method>customerRegisterSuccess</method>
                    </hoop_privacy>
                </observers>
            </customer_register_success>

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

View solution in original post

1 REPLY 1

Re: event after customer registration

You need to declare classpath in your observer, replace

<class>hoop_privacy/observer</class> with <class>Hoop_Privacy_Model_Observer</class>

Now,

 

<customer_register_success>
                <observers>
                    <hoop_privacy>
                        <type>singleton</type>
                        <class>Hoop_Privacy_Model_Observer</class>
                        <method>customerRegisterSuccess</method>
                    </hoop_privacy>
                </observers>
            </customer_register_success>

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial