0

I have a store in Magento 1.7, and as it is b2b, the first page is login. I need to have a box for Creating account, which I already have. There I need to have a text field to write the e-mail, and then click a button Create account, in order to fill all the necessary information for the registering.

My question is, how can I get the e-mail from the form? And, currently my 'Create account' button is defined as

<button type="button" title="<?php echo $this->__('Create an Account') ?>" class="login" onclick="window.location='<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>';"><span><span class="textLoginButton"><?php echo $this->__('Create an Account') ?></span></span></button>

but this simply redirects to a normal registering page that doesn't include the already provided e-mail. How can I do in order for the e-mail to be included automatically in my registering form?

I guess that there is some method in Magento to retrieve it, but I am new to Magento and don't know which are the available methods.

Any help will be much appreciated.

6
  • to where you want to get the email?
    – Mujahidh
    Jan 10 '17 at 9:27
  • I need something like: text field where the customer writes an e-mail; then it clicks 'Create account', and it is redirected to a form with different fields. One of the fields of the form is the e-mail, which is already filled from what the customer wrote in the first page. The other fields in the form are now to be included by the customer
    – LeCodeur
    Jan 10 '17 at 9:31
  • Are u talking about customer registration or something else you want to achieve?
    – Mujahidh
    Jan 10 '17 at 9:37
  • Yes, sorry, customer registration, it's just that I need it in this specific way. It's a b2b page, that's why it's a bit different.
    – LeCodeur
    Jan 10 '17 at 9:40
  • 1
    If the customer is registered you can get the customer registered session variables to retrieve the email from any where.Once the customer registered successfully to which page you are redirecting the customer
    – Mujahidh
    Jan 10 '17 at 9:46
1

You can get the customer details from the customer session.

if (Mage::getSingleton('customer/session')->isLoggedIn()) {
     $customer = Mage::getSingleton('customer/session')->getCustomer();
     $customerData = Mage::getModel('customer/customer')->load($customer->getId())->getData();
  // from this customer data you can get the email.
}

You can use some plugins to restrict the customer access until manual verification.Refer this link

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.