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:

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:

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:

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

PromotionalContentSlot

/atg/registry/SlotRegistry.componentRootPath

promotionalContent

PromotionalContentTargeter

/atg/registry/TargeterRegistry.componentRootPath

promotionalContent

ProductSpotlightSlot

atg/registry/SlotRegistry.componentRootPath

product

ProductSpotlightTargeter

/atg/registry/TargeterRegistry.componentRootPath

product

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:

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.


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