Next >

Tutorial: Modifying a controller command

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 our 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.


Learning objectives

After completed this tutorial, you should be familiar with the following concepts:

After completing this tutorial, you should be familiar with the following tasks:


Time required

Expect this tutorial to take 30 minutes to complete. The tutorial takes longer if you explore concepts related to this tutorial.


Skill Level

This tutorial is intended for WebSphere Commerce Store developers who are responsible for modifying controller commands. To complete this tutorial, ensure that we are familiar with the following terms and concepts:

  1. Rational Application Developer.

  2. The Java programming language.

  3. The database type used in the WebSphere Commerce development environment.

Lessons in this tutorial

Next >