Jump to content

Get customer by email


Anna_kt
 Share

Recommended Posts

Hello, This is my first time using prestashop api. Actually I’m creating a react app, the user will enter his email i want to check if this email is a customer in my prestashop website or not.

I have tried to update the customer controller but i couldn’t.

If the email exists azar the response will be the customer object.

Anyone can help me please ?

Thanks

Edited by Anna_kt (see edit history)

Share this post


Link to post
Share on other sites

  • 4 months later...

Hi,

You can use this:

$customer_id = Customer::customerExists($email, true);
if ($customer_id) {
	$customer = new Customer($customer_id);
}

 

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More