Jump to content

How can I make email and password not required?


Recommended Posts

  • 9 months later...

Hi

 

I can suggest a workaround to manage this.

 

With this workaround, email and password field will come pre-filled, so you won't need to think about it :)

 

Note that these instructions are for Prestashop 1.5.4.1

 

Open controllers>admin>AdminCustomersController.php

 

Find line 302

 

 'type' => 'password',

 

change it to

 

 'type' => 'text',

 

then find line 386-393

 

 if (Tools::isSubmit('addcustomer') && Tools::isSubmit('submitFormAjax'))
 {
  $visitor_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
  $guest_group = Configuration::get('PS_GUEST_GROUP');
  foreach ($groups as $key => $g)
   if (in_array($g['id_group'], array($visitor_group, $guest_group)))
 unset($groups[$key]);
 }

 

And change it to

 

 if (Tools::isSubmit('addcustomer') && Tools::isSubmit('submitFormAjax'))
 {
  $visitor_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
  $guest_group = Configuration::get('PS_GUEST_GROUP');
  foreach ($groups as $key => $g)
   if (in_array($g['id_group'], array($visitor_group, $guest_group)))
 unset($groups[$key]);

  if (!$this->object->email){
  $this->object->email =  rand(1, 100000).'@megventure.com';
  $this->object->passwd = 'megventure';
  }	
 }

 

Instead of 'megventure' you can write anything.

 

Hope that helps.

 

Regards.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
  • 3 months later...
×
×
  • Create New...