0

I have to fire an observer method when the admin assign customer(s) to group on adminhtml. Can you help me which event is it?

I tried adminhtml_customer_save_after but it didn't worked.

Edit: My config.xml

    <adminhtml>
        <events>
            <adminhtml_customer_save_after>
                <observers>
                    <vendorname_packagename_customerconfigobserve>
                        <type>singleton</type>
                        <class>Vendor_Package_Model_Observer</class>
                        <method>observeCustomerConfig</method>
                    </vendorname_packagename_customerconfigobserve>
                </observers>
            </adminhtml_customer_save_after>
        </events>
    </adminhtml>

1 Answer 1

1

Try below event

Magento 2 :-

<event name="customer_save_after_data_object">
    <observer name="customer_save_after_observer" instance="Vendor\Sales\Observer\CustomereditPost" />
</event>

Magento 1 : -

<config>
    <adminhtml>
        <events>
            <adminhtml_customer_save_after>
                <observers>
                    <My_WebService_customer_register_success>
                        <type>singleton</type>
                        <class>My_WebService_Model_Observer</class>
                        <method>customerRegisterSuccess</method>
                    </My_WebService_customer_register_success>
                </observers>
            </adminhtml_customer_save_after>
        </events>
    </adminhtml>
</config>
7
  • magento.stackexchange.com/questions/251105/… check this one
    – Devidas
    Commented Sep 19, 2019 at 11:41
  • This might work in Magento2, but sadly this is a Magento1.9 store. Can you know what event should I use in 1.9?
    – Feralheart
    Commented Sep 19, 2019 at 11:44
  • check it i have update my code
    – Devidas
    Commented Sep 19, 2019 at 11:49
  • You have to call the event inside the adminhtml, not inside global
    – Devidas
    Commented Sep 19, 2019 at 11:52
  • It didn't triggered my method
    – Feralheart
    Commented Sep 19, 2019 at 11:59

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.