Change store pages

This topic describes how to change JSP pages provided with a starter store. The consumer direct starter store Registration page is used as an example, but the same methods can be applied to any pages in a starter store.

 

Commonly used data beans

Some of the most commonly used data beans and commands in the starter stores are listed below:

StoreErrorDataBean

Communicates error information to a JSP page.

StoreDataBean

Contains store-specific information, such as the store identifier and catalog identifier for the store.

OrderDataBean

Represents an order.

UserRegistrationDataBean

Represents the registration information for a member.

ProductDataBean

Represents a product and all of its attributes.

Many form elements in the starter stores use the ECUserConstants class. This class contains constants that specify the name of a form element, for example:

<input size="25" maxlength="50" 
 names="firstName" 
 type="text" value="<c:out value="$(firstname)"/>">

 

Change the Registration page

The Registration page allows customers to register at the store. When customers register, they must provide their first and last names, a logon ID, and an e-mail address and then create a password; these fields are required. Additionally, the Registration page may also display the following fields: Preferred language, Preferred currency, Age, Gender, and Send me e-mail about store specials; these fields are optional and may be removed through the Change Flow notebook.

The Registration page can be changed to enable it to collect additional customer information, as follows:

  1. Open the Registration page source file, UserRegistrationAddForm.jsp, found in the following directory:

  2. Place one or more fields in the desired location on the form.

  3. Name each field by its associated UserRegistrationAdd parameters using the ECUserConstants class.

  4. Set the values for the page element in the properties file.

  5. Edit the JSP file to get the text values for that element from the properties file.

  6. Test the changes.

 

 

Modifying properties files

All text displayed on store pages is contained in the following locale-specific properties files:

storetext_dynamic_locale.properties

This file contains most of the text on starter store pages and the text in notification messages. Use the Change Pages page to modify the text in this properties file.

storetext_locale.properties

This file contains error messages and field labels used in the starter store. You cannot use the Change Pages page to modify the text in this properties file. Instead, edit the file and then stop and restart the WebSphere Commerce Server.

The files are located in the following directory:

Related tasks