Customer object describes details of a logged in customer in a store.
Get customer email and billing country example
Ecwid.OnSetProfile.add(function(customer) {
console.log(customer.email);
console.log(customer.billingPerson.countryName);
});
// prints
// [email protected]
// United States
Fields:
Name | Type | Description |
---|---|---|
billingPerson | <Person> | Customer’s name along with his/her billing address, as entered in the last order. |
String | Email address of a customer | |
id | Number | Unique customer ID in Ecwid |
membership | <CustomerGroup> | Customer group details. Present only if customer belongs to a customer group |
ownerId | number | Store ID this customer belongs to |
registered | UNIX Timestamp | Registration date of this customer |
shippingAddresses | Array of <ShippingAddress> | A list of addresses in the customer’s address book |