1

I am allowing guest checkout through my store as well as checkout by registered members. I have noticed that if I use the create_user parameter in the checkout form the guest gets registered, and the next time he visits and uses the same email he is unable to place an order because the email address already exists.

So I assume I have to remove the create_user parameter, however when I do this the guest visitor is able to checkout using the email address of currently registered members. This means that in the order admin the guests orders are associated with the unknowing registered member.

I realise this is fairly unlikely to happen, but was wondering if there is a way to stop guests checking out with the email address/username of currently registered members?

1 Answer 1

1

You could write an extension that uses the cartthrob_pre_process hook (or possibly cartthrob_save_customer_info_start, depending on how your checkout flows).

Inside your extension method, grab $_POST['email_address'], check to see if a member exists with that email, and if they do, return an error screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.