Get logged in customer's details

Ecwid.Customer.get(customer)

This method receives all data on the customer currently logged in to the store.

Request example:

Ecwid.Customer.get(function(customer) { 
  console.log(customer.email);
});

// prints
// [email protected]

Fields available in the returned customer argument:

Field
Type
Description

email

string

Customer's email.

id

number

Customer's internal ID.

ownerId

number

Internal store ID.

registered

string

Customer's registration date in a stringified UNIX timestamp format. For example, "1718010611".

billingPerson

Customer's saved billing address.

shippingAddresses

array of objects shippingAddresses

Customer's saved shipping addresses.

billingPerson

Field
Type
Description

name

string

Full name of the customer.

companyName

string

Customer's company name.

street

string

Address line 1 and address line 2, separated by \n.

city

string

City.

countryCode

string

Two-letter country code.

countryName

string

Country name.

postalCode

string

Postal/ZIP code.

stateOrProvinceCode

string

State/province code, for example, NY.

phone

string

Customer's phone number.

shippingAddresses

Field
Type
Description

id

number

Ordered ID of saved shipping address.

Starts with 0 and iterates by 1.

person

Details of the saved shipping address.

Last updated

Was this helpful?