Jump to content

How to create confirm password in prestashop1.5


Recommended Posts

Days back i came with a requirement of having conform passowrd in prestashop1.5 registration page but i cant find a solution is forum for 1.5(Previuous versions hack is there). so i did it in my own. i am posting here so that it can help some body

 

 

Step1:-

*****

Go to themes/yourtheme/order-opc-new-account.tpl

 

and check for the folowwing

 

<p class="required password is_customer_param">

<label for="passwd">{l s='Password'} <sup>*</sup></label>

<input type="password" class="text" name="passwd" id="passwd" />

<span class="form_info">{l s='(5 characters min.)'}</span>

</p>

 

and the following

 

<p class="required password is_customer_param">

<label for="confpasswd">{l s='Confirm Password'} <sup>*</sup></label>

<input type="password" class="text" name="confpasswd" id="passwd" /

</p>

 

 

STEP2:-

******

Go to /controllers/front/Authcontrollers.php

 

check for function "processSubmitAccount()"

 

 

Add the following in that function

 

if( Tools::getValue('passwd') != Tools::getValue('confpasswd') )

$this->errors[] = Tools::displayError('Passwords Mismatches');

 

thats All ;) the validation will work along with the default validation

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...