The PromotionalContent-ATGSlot and PromotionalContent-ATGTargeter cartridges display promotional content items in the left-hand rail of both the category and browse pages. The ProductSpotlight-ATGSlot and ProductSpotlight-ATGTargeter display products in the main content area of both the category and browse pages. The content for these cartridges is provided by ATG slots and targeters that have been defined in the ATG Control Center and the Business Control Center, respectively. All four cartridges have a similar structure, described below.
Template
The XML templates for the PromotionalContent-ATGSlot, PromotionalContent-ATGTargeter, ProductSpotlight-ATGSlot, and ProductSpotlight-ATGTargeter cartridges are located in equivalently named files in the <ATG10dir>/CommerceReferenceStore/Store/Storefront/deploy/cartridge_templates directory. Each XML file defines the following properties:
componentPath: This property defines either a partial or a full path to the ATG slot or targeter that is providing the content. If a partial path is provided in Experience Manager, the cartridge handler prepends this value with the correct ATG registry path.itemCount: This property determines the number of items the cartridge will render. For thePromotionalContentcartridges, this value is fixed at 1 and is not editable in Experience Manager. For theProductSpotlightcartridges, this value defaults to 4 and is editable in Experience Manager. Out of the box, Commerce Reference Store is designed to handle four products on a single line in the main content area; if more than four products are returned, the products wrap to a new line.
Content Item and Handler
The atg.projects.store.assembler.cartridge.TargetedItemsContentItem class represents the content item that the PromotionalContent-ATGSlot, PromotionalContent-ATGTargeter, ProductSpotlight-ATGSlot, and ProductSpotlight-ATGTargeter cartridges return to the renderer. The TargetedItemsContentItem class has one property, called items, that contains the items that were returned by the ATG slot or targeter. The number of items contained in this property is limited by the itemCount value defined in the Experience Manager configuration.
The atg.projects.store.assembler.cartridge.handler.TargetedItemsHandler class creates and populates the TargetedItemsContentItem object. Four components use this class, one for each cartridge type:
/atg/endeca/assembler/cartridge/handler/PromotionalContentSlot/atg/endeca/assembler/cartridge/handler/PromotionalContentTargeter/atg/endeca/assembler/cartridge/handler/ProductSpotlightSlot/atg/endeca/assembler/cartridge/handler/ProductSpotlightTargeter
The /atg/endeca/assembler/NucleusAssemblerFactory.handlerMapping property includes the following mappings to associate each ATG slot or targeter cartridge with the correct handler component:
PromotionalContent-ATGSlot=\
/atg/endeca/assembler/cartridge/handler/PromotionalContentSlot,\
PromotionalContent-ATGTargeter=\
/atg/endeca/assembler/cartridge/handler/PromotionalContentTargeter,\
ProductSpotlight-ATGSlot=\
/atg/endeca/assembler/cartridge/handler/ProductSpotlightSlot,\
ProductSpotlight-ATGTargeter=\
/atg/endeca/assembler/cartridge/handler/ProductSpotlightTargeter,\The four handler components all have the following properties:
pathPrefix: A prefix that is prepended, if necessary, to thecomponentPathdefined by the XML template in order to create a fully-qualified path to the ATG slot or targeter. Each component sets this prefix by linking to the properties listed in the table below.sourceMap: The path to theTargetingSourceMapcomponent that is used during the targeting operations. (See the ATG Personalization Programming Guide for more information onTargetingSourceMapcomponents.)itemDescriptor: The item descriptor type that should be returned, for example,promotionalContentorproduct.repository: The repository that contains the item descriptor type that should be returned. Item descriptor types are not unique across repositories, so the handler must compare both the item descriptor type and the repository type when calculating which items to return.validators: An array ofCollectionObjectValidatorcomponents to apply to the returned items to determine whether to include them in the content item.
The sourceMap property is the same for all four components, /atg/targeting/TargetingSourceMap. Each component has its own values for the pathPrefix and itemDescriptor, as shown in the table below:
Component | pathPrefix | itemDescriptor |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The TargetedItemsHandler class is an extension of the com.endeca.infront.cartridge.NavigationCartridgeHandler class with overrides for the process() method. The process() method determines if the componentPath provided by Experience Manager is a complete path and, if not, it prepends the componentPath with the value in pathPrefix. After a complete path is determined, the ATG slot or targeter component is resolved and the number of items specified in the itemCount property are retrieved from the appropriate ATG repository (if no itemCount property is supplied, all of an ATG slot or targeter’s items are returned).
The process() method also calls the validateItem() method for each repository item. This method applies the CollectionObjectValidator components listed in the validators property to the repository item to determine whether to include it in the content item. By default, the validators property on all four TargetedItemsHandler components is set to the /atg/store/collections/validator/StartEndDateValidator component.
JSP Renderer
Four renderers are included in Commerce Reference Store, one for each cartridge:
store.war/cartridges/PromotionalContent-ATGSlot/PromotionalContent-ATGSlot.jspstore.war/cartridges/PromotionalContent-ATGTargeter/PromotionalContent-ATGTargeter.jspstore.war/cartridges/ProductSpotlight-ATGSlot/ProductSpotlight-ATGSlot.jspstore.war/cartridges/ProductSpotlight-ATGTargeter/ProductSpotlight-ATGTargeter.jsp
The PromotionalContent JSP pages iterate through the TargetedItemsContentItem.items property and include the item.template.url page for each item. The ProductSpotlight JSP pages iterate through the TargetedItemsContentItem.items property and include the store.war/global/gadgets/promotedProductRenderer.jsp page for each item.
The “Featured Items” label that appears above the product spotlight row in the main content area, along with its translated versions, is stored in the StoreText repository in the productTargeter_spotlightTitle item and may be edited in the Business Control Center.

