0

I need to send the customer informations through a POST to another endpoint after registering him/her.

I tried to create a module based in this SMS module (customer_register_success not triggered after successful registration), but (I'm not used to make modules) it doesn't generates any log file.

app/etc/modules/Hypercube_Postregister.xml

<?xml version="1.0"?>
<config>
  <modules>
      <Hypercube_Postregister>
          <active>true</active>
          <codePool>local</codePool>
          <version>0.0.1</version>
      </Hypercube_Postregister>
  </modules>
</config>

app/code/local/Hypercube/Postregister/etc/config.xml

<config>
  <modules>
      <Hypercube_Postregister>
          <version>0.0.1</version>
      </Hypercube_Postregister>
  </modules>
  <global>
      <events>
          <customer_register_success>
              <observers>
                  <Hypercube_Postregister_customer_register_success>
                      <type>singleton</type>
                      <class>Hypercube_Postregister_Model</class>
                      <method>customerRegisterSuccess</method>
                  </Hypercube_Postregister_customer_register_success>
              </observers>
          </customer_register_success>
      </events>
  </global>
</config>

app/code/local/Hypercube/Postregister/Model/Observer.php

<?php
class Ucs_GlobalPostregister_Model_Observer {
  public function customerRegisterSuccess(Varien_Event_Observer $observer) {
    $event = $observer->getEvent();
    $customer = $event->getCustomer();
    $email = $customer->getEmail();
    Mage::log('Hello World!', null, 'mylogfile.log', true);
  }
}
?>

What am I missing?

4
  • Did my solution worked ?
    – Pawan
    Jul 13 '18 at 15:43
  • No.. it doesn't create any log :/ can I check in another way? Jul 13 '18 at 17:55
  • Hello @Rafael, Please check my updated answer. I updated whole code.
    – Pawan
    Jul 17 '18 at 4:21
  • Have you checked updated answer ?
    – Pawan
    Jul 18 '18 at 3:27

Your Answer

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

Browse other questions tagged or ask your own question.