Jump to content

Prestashop 1.7 login in PS 1.6 - create account or guest depending if customer inserts password


Recommended Posts

Hello,

 

Is it possible to create login in PS 1.6 which works like it in PS 1.7? I mean, only one login type, not guest and create account separately, and depending if customer inserts password - if yes he has regular customer account which he can use later to place another order and if not he has a guest account?

 

It works great in PS 1.7, definitely would help with returning customers, is there any override or a module which alters the way customers can register?

 

Kind regards

Link to comment
Share on other sites

  • 5 months later...

Hi,

 

My idea is simple: there's one login form (just like in PS1.7), if customer enters password he has account created if not he is guest. 

 

I've almost managed to solve this, just got one issue. 

 

Could someone from prestashop tell me how to create condition on authentication page in <form id="account-creation_form" creat condition:

 

if customers inserts all the necessary data and inserts password then standard Customer account is created

 

or customers inserts all the necessary data and does not inserts password then guest account is created?

 

I will try to share the solution if I manage to have it done. 

 

Regards

Link to comment
Share on other sites

  • 3 weeks later...

Is there some documentation for prestashop honestly? Or do I have to check myself every single line of code to figure our what's the function that creates an account for example.

 

Could somebody help me find validation for password?

 

Basically, password field is blank, there's an error saying that customer account can't be created. I've tried to change the:

 public static function isPasswd($passwd, $size = Validate::PASSWORD_LENGTH)
    {
        return (Tools::strlen($passwd) >= $size && Tools::strlen($passwd) < 255);
    }

$size to 0, but still can't create account when password is not inserted because:There is 1 error

  1. An error occurred while creating your account.

 

How to allow password field to be empty? Or how to generate random password if customer doesn't insert anything there?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...