The store.war/global/gadgets/promotions.jsp
page displays the promotions a customer is eligible for. The promotions.jsp
page uses the value of the /atg/store/pricing/PromotionFilter.siteGroupPromotions
property to render the customer’s promotions. This property lists all of the promotions that are appropriate for the customer in the current site context. The
siteGroupPromotions
property is populated as follows:
Another
PromotionFilter
property,pricingModelHolder
, points to the/atg/commerce/pricing/UserPricingModels
component. TheUserPricingModels.getAllPromotions()
method returns an unfiltered collection of promotions for the customer that includes global promotions plus any promotions in the customer’sactivePromotions
profile property.A third
PromotionFilter
property,filter
, points to the/atg/store/collections/filter/PromotionSiteGroupFilter
component.PromotionFilter
invokes thePromotionSiteGroupFilter.generateFilteredCollection()
method and passes it the unfiltered collection of promotions.generateFilteredCollection()
filters the promotions in the collection to include only those promotions that are appropriate for the current site context. Promotions that have a site ID that matches the ID of the current site, or the IDs of any sites that share a shopping cart with the current site, are returned. Promotions that have no site ID are also returned. Promotions that do not have a matching site ID are filtered out.
Finally, promotions.jsp
renders the promotions returned by generateFilteredCollection()
.
Note: See the ATG Commerce Programming Guide for more details on the UserPricingModels
component.