The store.war/global/gadgets/promotions.jsp page displays the promotions a customer is eligible for. The promotions.jsp page uses the /atg/store/droplet/PromotionFilterDroplet to retrieve all available promotions (that is, global promotions plus any promotions in the customer’s activePromotions profile property) and filter them by site group and by start and end dates.

The filter property of PromotionFilterDroplet is set to /atg/store/collections/filter/PromotionFilter. The PromotionFilter component’s validators property is set to:

validators=\
/atg/store/collections/validator/PromotionSiteValidator,\
/atg/store/collections/validator/PromotionDateValidator

The PromotionSiteValidator component, which is of class atg.projects.store.collections.validator.SiteValidator, filters promotions based on site. It is configured to validate only those promotions that are associated with a cart sharing group that includes the current site:

shareableTypeId^=/atg/commerce/ShoppingCartShareableType.id

The PromotionDateValidator component, which is of class atg.projects.store.collections.validator.StartEndDateValidator, filters promotions based on their start and end dates. This component is configured to use the beginUsage and endUsage properties of promotion items to determine whether the promotion is currently valid:

startDatePropertyName=beginUsable
endDatePropertyName=endUsable

Note that the beginUsable and endUsable properties are null on all promotions included in Commerce Reference Store, so PromotionDateValidator will not actually invalidate any promotions unless you set these properties.

See Filters and Validators for more information about filtering of promotions and other repository items.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices