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 thePromotionalContent
cartridges, this value is fixed at 1 and is not editable in Experience Manager. For theProductSpotlight
cartridges, 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 thecomponentPath
defined 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 theTargetingSourceMap
component that is used during the targeting operations. (See the ATG Personalization Programming Guide for more information onTargetingSourceMap
components.)itemDescriptor
: The item descriptor type that should be returned, for example,promotionalContent
orproduct
.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.
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).
JSP Renderer
Four renderers are included in Commerce Reference Store, one for each cartridge:
store.war/cartridges/PromotionalContent-ATGSlot/PromotionalContent-ATGSlot.jsp
store.war/cartridges/PromotionalContent-ATGTargeter/PromotionalContent-ATGTargeter.jsp
store.war/cartridges/ProductSpotlight-ATGSlot/ProductSpotlight-ATGSlot.jsp
store.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.