The ATG Commerce implementation of gift lists supports most of the requirements for this feature for a typical commerce site. However, gift list functionality can be extended, if necessary.

This section describes how to extend gift list functionality by adding additional item properties to the gift-list item descriptor. The process includes the following basic steps:

Updating the Database and Repository Definition

You can extend your site’s gift list functionality by adding new gift-list item properties. To add new properties, do the following:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE taglib
  PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"

    <name>Commerce Giftlists</name>
    <author>Company XYZ</author>
  <item-descriptor name="gift-list">
    <property name="giftlistStatus" data-type="timestamp"

Note: You should only need to add to the schema and repository definition. Removing anything that is already there requires substantially more work.

Extending GiftlistFormHandler

After Updating the Database and Repository Definition to support additional gift-list item properties, you also need to extend the GiftlistFormHandler component to support them. To do so, do the following:

  1. Extend the class to support your new properties and override related methods. The source code for this form handler can be found in <ATG9dir>\DCS\src\Java\atg\commerce\gifts.

    Note that most handlers in the GiftlistFormHandler have preXXX and postXXX methods that can be overridden to support your requirements. To support your new property, you should override the postSaveGiftlist method to save your new property value in the repository.

  2. Layer on a file to configure an instance of the new class you created in step 1. The contents of the configuration file would look similar to the following:

    # MyNewGiftlistFormHandler

loading table of contents...