Jump to content

Any idea how to avoid that Prestashop checks whether an email from a guest client exists already in the database as customer


GillesV

Recommended Posts

Hello, 

 

Some clients complain about the validation process. Most of our clients select the option guest check-out and if they have already an account with us, Prestashop indicates that the email address is already in use and the client must provide another email address or log in to their account for which they forgot their password... So clearly the guest check out process for clients with an existing account is not optimal. 

I read on different forums that unfortunately it is not possible to deactivate the 'log in' identification and only propose the guest check out. 

 

Any idea ? Your help is appreciated. 

Regards, 

Gilles 

Link to comment
Share on other sites

I think you must override CustomerFormCore in  validate method there is 

$emailField = $this->getField('email');
        $id_customer = Customer::customerExists($emailField->getValue(), true, true);
        $customer = $this->getCustomer();
        if ($id_customer && $id_customer != $customer->id) {
            $emailField->addError($this->translator->trans(
                'The email is already used, please choose another one or sign in',
                [],
                'Shop.Notifications.Error'
            ));
        }

You can try change it to not validate is email exist, but I never try it before and I don't know is it enough.

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...