Gift certificates are created in the Claimable repository for customers to claim when they check out. This repository entry is typically generated when a user purchases the gift certificate. Please refer to the ATG Consumer Commerce Claimable repository for more information. The Claimable repository contains items that can be claimed by a user; it currently includes gift certificates and coupons.

For the Pioneer Cycling store, we created gift certificates as a product of the store. When the product was created, all the information necessary to create the Gift Certificate was captured by the base product item-descriptor definition. The gift certificate was created just as any other product and data was inserted with one exception: the fulfiller field. Gift certificates are “shipped” electronically, so we used the SoftgoodFulfiller instead of the standardHardgoodFulfiller used for tangible goods.

After we created the gift certificate item in the product catalog so that customers could view it, we generated a purchase page. The purchase page differs from the pages used to purchase hard goods in that the type of shipping group used to ship the gift certificate is different than hard goods. The two main differences are that when the gift certificate is purchased it requires an e-mail address, and the form submits to ShoppingCartHandler.handleAddSoftGoodToOrder() instead of .ShoppingCartHandler.handleAddItemToOrder(), which is used for hard goods.

The recipient’s e-mail address must be specified by the property softGoodRecipientEmailAddress of the ShoppingCartModifier component. This e-mail address is then used by the handleAddSoftGoodToOrder() method to populate the shipping group associated with the gift certificate.

The JSP that places the gift certificate into the cart looks like:

Recipient's email address <dsp:input
bean="ShoppingCartModifier.softGoodRecipientEmailAddress" size="30"/>
<p>
<%/* ADD TO CART BUTTON: Adds this SKU to the Order*/%>
<dsp:input bean="ShoppingCartModifier.addSoftGoodToOrder" type="submit" value="
     Add Gift Certificate to Cart  "/>

Note that the amount of the gift certificate is set as the face value of the item times the quantity. So, if a store offers gift certificates with a SKU price of $20 and a customer purchases five of them for one address, the amount of the gift certificate is set to $100.

 
loading table of contents...