Customizing WebSphere Commerce

You can extend the WebSphere Commerce product to fit your business needs. This topic describes the prerequisite skills and required knowledge that you need to customize business logic. After you have the required knowledge, use WebSphere Commerce Developer to take tutorials that guide you step-by-step through various customization scenarios.

What you need to know before you start

WebSphere Commerce is a Java and Java EE compliant application. To successfully customize WebSphere Commerce you need skills and knowledge in the following areas:
  • Basic Java and Java EE application development skills
  • Basic JavaServer Pages (JSP) development and deployment skills
  • Basic Java servlet development and deployment skills
  • Basic JavaServer Pages Standard Tag Library (JSTL) skills
  • Basic HTML skills
  • Basic SQL skills
  • Basic XML skills
  • Familiarity with developing and deploying Java servlets and JavaServer Pages in dynamic Web applications
  • Basic understanding of Rational Application Developer
Before you begin to customize WebSphere Commerce, understand the following, and read the following topics.
  • All files should be encoded in UTF-8.
Required knowledge See
Understand the main components and capabilities of the WebSphere Commerce development environment.
Understand the WebSphere Commerce architecture including the information model, data model, and programming model.
Understand how the WebSphere Commerce development environment interacts with the Web server, Database server and WebSphere Application Server.
Understand the major components of WebSphere Commerce and how they interact.
Understand how the data model, presentation information, and control information are separated into different objects.
Understand the programming frameworks used by WebSphere Commerce and when to use each model.
Understand the relationship of the business context service to business logic.
Understand features of developing Enterprise JavaBeans.
Understand the main features of developing commands.

Tutorials, samples and procedures

When you have the required skills and knowledge, the following instructions are available to you:

Tutorial Learning objectives Description
Tutorial: Creating business logic
After completed this tutorial, you should be familiar with the following concepts:
  • Business logic
  • Views
  • Controller commands
  • Data and entity beans
After completing this tutorial, you should be familiar with the following tasks:
  • Creating business logic to develop WebSphere Commerce applications
  • Creating views to display content on storefront pages
  • Creating controller commands to return a view task to be implement
  • Creating data beans to provide dynamic content for a JSP page
  • Creating and integrating entity beans to store data returned from a JSP page
In this tutorial, you create the business logic for a new view, controller command, data bean, and entity bean. New business logic is required when a change is made to the default business logic behavior of WebSphere Commerce. This tutorial guides you through creating business logic to support an application to track bonus reward points earned by customers in a new customer loyalty program application. The assets you will create include a view, a controller command, a task command, data beans, and an entity bean. This tutorial is for demonstration purposes only and does not reflect all the logic required to build a fully functional loyalty program application. From this tutorial, you learn the common development steps for creating the previously listed code assets.
Tutorial: Modifying a controller command
After completed this tutorial, you should be familiar with the following concepts:
  • OrderItemAddCmdImpl class
  • Controller commands
After completing this tutorial, you should be familiar with the following tasks:
  • Creating implementation for a controller command
  • Updating the command registry so that the new implementation gets used in your application
  • Deploying a modified controller command to a WebSphere Commerce application
This tutorial demonstrates how to modify an existing controller command. In this tutorial, you restrict the number of items in a customer's shopping cart to five or fewer unique items. To implement this solution, you override the OrderItemAddCmdImpl class with your own implementation. The implementation includes logic to check for the number of items in the shopping cart. If a customer attempts to add a sixth item to the shopping cart, an exception is thrown. This exception uses a new error message.
Tutorial: Using Struts tags, action forms, and validation
After completing this tutorial, you should be familiar with the following concepts:
  • Struts
  • Action forms
  • Validation
  • JSPs
  • Controller commands
After completing this tutorial, you should be familiar with the following tasks:
  • Creating HTML forms
  • Creating dynamic action forms
  • Changing the implementation of a view
  • Adding validation
  • Adding messages to a store as a struts
In this tutorial, you learn how to use Struts tags, action forms, and validation in the context of WebSphere Commerce store development.
Tutorial: Extending a Struts action
After completing this tutorial, you should be familiar with the following concepts:
  • Struts
  • Action classes
  • Implementation classes
After completing this tutorial, you should be familiar with the following tasks:
  • Extending a struts action
  • Use cookies in your implementation to associate a referral with users
In this tutorial, you learn how to extend Struts actions in the context of WebSphere Commerce store development. Specifically, you are creating a new action class, MyNewAction, that extends the WebSphere Commerce BaseAction class.
Tutorial: Extending a BOD service to manage UserData with the Data Service layer
After completing this tutorial, you should be familiar with the following concepts:
  • Understanding the WebSphere Commerce Data Service Layer
  • Overview of simple extension and customization tasks.
After completing this tutorial, you should be able to perform the following tasks:
  • Updating the WebSphere Commerce database with new tables and relationships.
  • Generating custom object-relational metadata that describe new tables and relationships.
  • Generating static service data objects (SDO) that provide a Java representation of the newly added tables.
  • Configuring the logical DataObject to physical DataObject mapping.
  • Creating a custom query template file to map an XPath expression and access profile to SQL.
In this tutorial, you customize the Catalog service to support warranty information and care instructions for Catalog Entries. This customization updates the WebSphere Commerce schema so that it stores the new information and customizes the Catalog service to include new information. The new information is included as user data in the CatalogEntry noun.
Tutorial: Extending a search profile to retrieve and display custom data in the storefront
After completing this tutorial, you should be familiar with the following concepts:
  • Search profiles
  • CatalogEntryView noun
After completing this tutorial, you should be familiar with the following tasks:
  • Customize WebSphere Commerce search
  • Customize the catalog programming model
  • Extend a search profile
  • Customize the business object mediator
  • Create a custom get data configuration file
In this tutorial, you learn how to create catalog data and display this data in the storefront by using the search-based catalog navigation noun.
Tutorial: Displaying additional UserData in mobile native applications
After completing this tutorial, you should be familiar with the following concepts:
  • REST Services
  • JavaScript Object Notation
After completing this tutorial, you should be familiar with the following tasks:
  • Specify a custom access profile to retrieve custom UserData by using REST services
  • Extend existing sample Android code to add information about the product page
  • Create an activity to retrieve custom warranty data
In this tutorial, you learn how to display custom UserData in a mobile native application via REST services.

Best practices