StarterStore Signup Component
Synopsis
SignupFormComponent is a built-in HstComponent to support customer sign-up in Starter Store applications.
When a visitor is not enrolled yet, a sign-up link can be provided for the visitor, who can fill in the sign-up form to enroll as a customer for the commerce backend service.
SignupFormComponent processes the sign-up by invoking the commerce backend REST APIs such as commercetools HTTP API - Customers.
Component Overview
Rendering phase
In rendering phase, its template is supposed to display all available fields for the visitor's sign-up form, such as customer names, e-mail address and password.
Action phase
On visitor's sign-up form submission, SignupFormComponent first validates the inputs, displaying errors if validation fails; or it invokes CRISP API with the corresponding CommerceConnector and CommerceConnectorComponent (id: "createCustomer") models, which ends up exchanging data with the commerce backend service. For details on the "createCustomer" connector component configuration, see commercetools Merchant Configurations.
If successful in creating a customer, it redirects the visitor to the sign-in page.
Component Details
Below are the details of the component and the related configurations.
Component class | com.bloomreach.commercedxp.starterstore.components.SignupFormComponent |
Template configuration | /hst:hst/hst:configurations/starterstoreboot/hst:templates/starterstore-signup |
Template resource | webfile:/freemarker/hstdefault/starterstore-signup.ftl |
Page configuration | /hst:hst/hst:configurations/starterstoreboot/hst:pages/signup-contentpage |
Sitemap Item configuration | /hst:hst/hst:configurations/starterstoreboot/hst:sitemap/signup |