0

Here is the code-

app/etc/modules/Ds_Customerlog.xml -

<?xml version="1.0"?>
<config>
  <modules>
    <Ds_Customerlog>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
    </Ds_Customerlog>
  </modules>
</config>

app/code/local/Ds/Customerlog/etc/config.xml -

<?xml version="1.0"?>
<config>
  <modules>
    <Ds_Customerlog>
      <version>0.1.0</version>
    </Ds_Customerlog>
  </modules>
  <global>
    <helpers>
      <customerlog>
        <class>Ds_Customerlog_Helper</class>
      </customerlog>
    </helpers>
    <models>
      <ds_customerlog>
        <class>Ds_Customerlog_Model</class>
    </ds_customerlog>
    </models>
    <events>
      <customer_register_success> <!-- identifier of the event we want to catch -->
          <observers>
            <customer_register_success_handler> <!-- identifier of the event handler -->
              <class>Ds_Customerlog_Model_Observer</class> <!-- observers class alias -->
              <method>observer</method>  <!-- observer's method to be called -->
            </customer_register_success_handler>
          </observers>
        </customer_register_success>
    </events>
  </global>
</config> 

app/code/local/Ds/Customerlog/Model/Observer.php -

<?php
class Ds_Customerlog_Model_Observer
{

    public function observer(Varien_Event_Observer $observer)
    {
        die("sfs");
        $customer = $observer->getEvent()->getCustomer();
        Mage::log($customer->getFirstname(), null, 'customer.log'); 
    }

}

Here die("sfs") not being executed on customer registration on both frontend and backend. Any help would be appreciated.

0

For the frontend, you can use the below link.

http://easyndfaster.com/blog/post/magento-1-customer-after-save-event-triggered-front-end-side/

For the backend, you can use the below link.

http://easyndfaster.com/blog/post/magento-1-customer-after-save-event-triggered-admin-side/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.