Programming model tutorials
WebSphere Commerce provides tutorials that are designed to introduce the various tasks related to creating customized code to develop and enhance WebSphere Commerce applications. The following tutorials provide sample guides to customizing elements of the WebSphere Commerce programming model.
- 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.