Developing a list of store pages

In order to develop a list of the pages needed to create your store, you need to know the business and functional requirements of the store.

Store shopping flow

Once business processes are available, you can create the shopping flow for your store. The shopping flow reflects the requirements and business processes defined for your store, illustrating how a customer will move through the store. For example, a customer may enter your site through the home page and be asked to register before browsing the catalog, or you may choose to allow customers to view the catalog as guests, without registering. Some shopping flows allow customers to complete a "quick checkout", while others require that a customer completes all checkout steps every time they make a purchase. Or your shopping flow can offer customers the choice of both checkouts. To verify that the store flow diagram is complete, ensure that all steps in the business processes for your store are illustrated in the store flow diagram.

Mapping out the shopping flow visually, as the following diagram for the Consumer direct store's shopping flow does, allows you to see how customers will travel through your store.

The diagram for the Consumer direct store shopping flow is quite simple. Although it includes the main flow of the customer's journey through the store, it does not include any error scenarios. For example, what happens when a customer logs in using the wrong password, or enters an invalid credit card number? However, even a simple diagram like this allows you to develop a list of pages needed for the store: to start, you will need to create a view for every page listed in the shopping flow diagram.

Error pages

The exception flows in your business processes can also help you determine what error pages you need to create for your store. The registration business process forconsumer direct sample store specifies the following exception flows:

  • Logon ID already exists: If the logon ID already exists in the system, the system displays an error message asking the user to enter another logon ID. The business process resumes from beginning.
  • Missing mandatory fields: If any of the following fields (Logon ID, Password, Verify password, First name, Last name, E-mail) are not completed, the system issues an error message. The business process resumes from beginning.
  • Invalid password: If the password does not match the verification password, the system issues a warning.

For every new exception flow that you create, you will need to create either an error page or an error message:

  • Error messages should be added to the following files:
    • WC_eardir/Stores.war/WEB-INF/classes/ storedir/storeErrorMessages_ locale.properties
    • WC_eardir/Stores.war/WEB-INF/classes/ storedir/storeErrorMessages.properties
  • Adding an error page is optional: you may instead choose to redirect the customer to the page where the exception was generated and display the error message there.

Procedure

  • Edit the Web deployment descriptor (web.xml) directly for the WAR file you are working with. For example:
    <error-page>
         <error-code>500</error-code>
       
    <location>/servlet/ExceptionHandlerServlet</location>
    </error-page>
    
  • Use the Web deployment descriptor editor in WebSphere Commerce Developer to add error pages.