Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Customer profiles

Customer profiles

Customer Profiles allow you to set up the required or optional information fields for customers. The information is stored using the same attribute mechanism that is used for products. Elastic Path has a predefined set of system customer profile attributes that cannot be changed. You can add, update, delete new customer profile attributes for your application through Commerce Manager. All customer profile attributes are not locale dependent.

System customer profile attributes

  • First Name - Customer first name, required field, short text type.
  • Last Name - Customer last name, required field, short text type.
  • Email - Customer email address, required field, short text type.
  • Prefered Locale - Customer prefered locale, optional field, short text type.
  • Prefered Currency - Customer prefered currency, optional field, short text type.
  • Anonymous - Indicate whether the customer is anonymous, required, boolean type.
  • All customer created in the Commerce Manager are not anonymous customers.
  • Phone - Customer phone number, optional field, short text type.
  • Fax - Customer phone number, optional field, short text type.
  • Gender - Customer gender, optional field, short text type.
  • Company - Customer company, optional field, short text type.
  • Date of Birth - Customer date of birth, optional field, date type.
  • Html email - Indicate whether to received html format email, required field, boolean type.
  • Be notified of news - Indicate whether to received newsletter by email, required field, boolean type.

Key classes and files

  • Customer - Represents a customer. A customer has a customer profile. For easy access, some system attributes can be set and retrieved through the customer object directly.
  • CustomerProfile - A customer profile contains a collection of customer profile attribute values. It provides the interface to retrieve or update all profile values.
  • AttributeValue - Represents the value for a given attribute for a given customer.
  • Attribute - Defines the customer profile attribute type, usage, key, name etc.
  • AttributeService - A service that provides all attribute maintenance functions.
  • CustomerService - The register and edit account pages will interact with customer service to add and update customer information.

How it works

  1. The user requests the register or edit customer page and inputs the customer attribute values.
  2. The CheckoutCreateAccountFormController or EditAccountFormControllerImpl validates the input value and calls the CustomerService to add and update the customer.

Notes

  • Cortex will not dynamically display customer profile attributes added in the Commerce Manager. You will need to customize Cortex to display the desired profile attributes.