With the exception of the two custom classes listed below, Commerce Reference Store uses standard ATG Commerce gift list functionality:
Commerce Reference Store adds a derived property,
quantityRemaining
, to thegift-item
item descriptor in the gift list repository. This property captures the quantity of a gift item that hasn’t been purchased yet. It is defined in the/atg/commerce/gifts/giftList.xml
file in<ATG9dir>/CommerceReferenceStore/Store/EStore/config.jar
.quantityRemaining
is of typeatg.projects.store.gifts.GiftlistRemainingQuantity
, a CRS-specific class that extendsatg.repository.RepositoryPropertyDescriptor
. TheGiftlistQuantityRemaining
class has fields for quantity desired and quantity purchased, as well as a method for retrieving the remaining quantity.Commerce Reference Store adds another custom class,
atg.projects.store.gifts.StoreGiftlistFormHandler
, which is an extension ofatg.commerce.gifts.GiftlistFormHandler
. Only registered customers are allowed to add gifts to their gift lists.StoreGiftlistFormHandler
includes functionality to determine if a customer is logged in before allowing the customer to add a gift to a gift list. This class also contains a number of methods that perform basic validation such as date validation, requiring gift quantities to be greater than zero, and so forth.