3

I dont want my customer to enter password while creating account in magento.When customer creates account password should be auto generated and mail should be sent to that customer .Can anybody help me out plz...

1 Answer 1

9

You can make the password input in the registration and checkout process as a hidden input and have an algorithm that generates random values for it.
For example at registration you have these fields for passwords

<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />

and

<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />

Turn them into this:

<?php $password = Mage::helper('core')->getRandomString($length = 7)?>

<input type="hidden" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" value="<?php echo $password?>"  />

and

<input type="hidden" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" value="<?php echo $password?>" />
9
  • The customer won't know what the password is, then, so a reminder email needs to be triggered.
    – philwinkle
    Commented Oct 15, 2013 at 13:54
  • 1
    @philwinkle. In the standard registration e-mail you get your passoword.
    – Marius
    Commented Oct 15, 2013 at 13:57
  • Touché, you're absolutely correct.
    – philwinkle
    Commented Oct 15, 2013 at 14:33
  • 1
    Though, that's typically one of the first things that I alter...
    – philwinkle
    Commented Oct 15, 2013 at 14:33
  • 1
    @LukeA.Leber. From what I see it's still there: github.com/OpenMage/magento-mirror/blob/1.9.2.4/app/locale/…
    – Marius
    Commented May 27, 2016 at 19:19

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.