JSP code snippet: Promotion code form

This JSP code snippet displays the following information:

This snippet assumes that the promotion code form is in the shopping cart page. If the promotion code form is not in the shopping cart page, change the values for parameter 'URL' and 'errorViewName' accordingly. More information is provided in the JSP comments.

The PromotionCodeForm.jsp file is available under the following directory:

 

Prerequisites

Before customers can enter a promotion code, create a promotion with a corresponding promotion code, using the WebSphere Commerce Accelerator.

Usage

To use this snippet, you can cut and paste the code from the snippet to your shopping cart page. If your store page is based on the consumer direct starter store, the JSP file for the shopping cart is OrderItemDisplay.jsp.

The two properties files used by this snippet are:

You may want to copy the properties to the proper location, for example,

WCDE_installdir\workspace\Stores\Web Content\WEB_INF\classes\store\Snippets\Marketing\Promotions
or merge them with your own properties file and your error message properties file.