In addition to the product templates, Commerce Reference Store includes several pages that enable customers to compare products and maintain gift and wish lists. These pages are accessed through links that appear above the menu bar:
Comparisons
Customers specify products for comparison by selecting the + Comparisons link on product detail pages. The items selected are tracked using the /atg/commerce/catalog/comparison/ProductList
component, as described in the ATG Commerce Programming Guide. Clicking the Comparisons link displays the store.war/comparisons/productComparisons.jsp
page, which renders a table with a column for each product. The rows contain information such as product features, available colors and sizes, etc.
Product comparisons are shared between ATG Store US and ATG Home, because the sharing of product comparisons is tied to the same shareable type component that manages shopping cart sharing. Each product name in a comparison list is a link to that product on the site it was added to the list from.
Gift Lists and Wish Lists
The Commerce Reference Store stores allow customers to create any number of gift lists, so that different lists can be created for different events. In addition, each customer has a single wish list. The products on the gift lists and the wish list are tracked in the /atg/commerce/gifts/Giftlists
repository, as described in the ATG Commerce Programming Guide. A customer can add a product to any of these lists using options on the product detail page.
The same gift lists can be accessed on multiple sites. Gift list access is controlled by the /atg/commerce/gifts/GiftlistManager
component’s siteScope
setting. By default, GiftlistManager.siteScope
is set to all
, so all gift lists can be accessed on any site. The Commerce Reference Store Store.Estore
module changes this setting so that each gift list can be accessed only on sites that share a shopping cart with the site the gift list is associated with:
siteScope=atg.ShoppingCart
Because a customer can have only one wish list, it must be accessible from all sites. Commerce Reference Store uses the /atg/registry/CollectionFilters/GiftlistSiteFilter
component to filter the items in a wish list to show only those items that are appropriate for the current site context.
Each product name in a gift or wish list is a link to that product on the site the customer was on when the product was added to the list.
See the ATG Commerce Guide to Setting Up a Store for more information about sharing gift and wish lists.
Commerce Reference Store Extensions
Commerce Reference Store uses standard Commerce gift and wish list functionality, with the following extensions:
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/giftlists.xml
file in<ATG10dir>/CommerceReferenceStore/Store/EStore/config/config.jar
.quantityRemaining
is of typeatg.projects.store.gifts.GiftlistQuantityRemaining
, a Commerce Reference Store-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 changes the class of the
/atg/commerce/gifts/GiftlistFormHandler
component toatg.projects.store.gifts.StoreGiftlistFormHandler
, which is a Commerce Reference Store-specific subclass ofatg.commerce.gifts.GiftlistFormHandler
.StoreGiftlistFormHandler
includes functionality that determines 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, etc.