websphere-commercewcs

How to add a new field to customer


Is there a way to add a new field to customer for WebSphere Commerce Accelerator - > Edit Customer view. In "Demographics" section for example. enter image description here


Solution

  • The architecture of Websphere Commerce Accelerator is a JSP/XML/JS Framework. You can find here a global picture of it

    The user's data for the page come from an DataBean or AccessBean (EJB wrapped in some IBM layers).

    Then you will also have to extend the existing implementation of the Controller command called when The 'Finish' button is submitted.

    Depending on where and how you expect to store the new data in the database (i.e a custom field Field1 , Field2,... in the existing table USERDEMO, or a new extension table like XUSERDEMO )

    To assist you, here are severals tutorials of IBM about how to modify or extend each layer:

    1. tutorial to create a complete new page. Should help you to have a general idea of the work
    2. another page from the Information Center about how to customize each part of the framework
    3. create/extend a new Tools/ControllerCommand
    4. If the existing Accessbean doesn't allow you to access the Fieldx column, or if you want to use an extended table, here is a tutorial to create a new access bean

    Finally, regarding your specific example, the files to update/extend are: