Commerce Reference Store uses Oracle Endeca’s existing HorizontalRecordSpotlight cartridge with some modifications described below.

Template

The XML template for the HorizontalRecordSpotlight cartridge is located in <ATG10dir>/CommerceReferenceStore/Store/Storefront/deploy/cartridge_templates/HorizontalRecordSpotlight.xml. The title and seeAllLinkText labels are not editable in Experience Manager because Commerce Reference Store uses localized values for these labels that must be computed at query time.

Also, the name attribute of the PreviewProperty sub-element of the recordSelection editor is set to product.repositoryId. Any property to be returned to the renderer must be specified in both the XML template as a PreviewProperty and in the /atg/endeca/assembler/cartridge/handler/config/RecordSpotlightConfig component’s fieldNames property (see below for more details on this component).

<editors:RecordListEditor propertyName="recordSelection" label="Spotlight Records">
     <PreviewProperty name="product.repositoryId"/>
</editors:RecordListEditor>
Handler

The /atg/endeca/assembler/cartridge/handler/RecordSpotlight component is included in the DAF module, where it is configured as follows:

$class=com.endeca.infront.cartridge.RecordSpotlightHandler
$scope=prototype

# Import properties
$basedOn=RecordBasedNavigationCartridgeHandler

contentItemInitializer=config/RecordSpotlightInitializer

The Commerce Reference Store Store.Endeca.Assembler module changes the class of the RecordSpotlight component to atg.projects.store.assembler.cartridge.handler.FilteringRecordSpotlightHandler, which is a subclass of com.endeca.infront.cartridge.RecordSpotlightHandler. The FilteringRecordSpotlightHandler class adds two properties, storeCartridgeTools (for specifying the StoreCartridgeTools component), and rangeFilterBuilders (for specifying an array of range filter builders). The configuration added by the Store.Endeca.Assembler module looks like this:

$class=atg.projects.store.assembler.cartridge.handler.FilteringRecordSpotlightHandler

# Tools class to perform common cartridge specific tasks.
storeCartridgeTools=/atg/endeca/assembler/cartridge/StoreCartridgeTools

# Endeca RangeFilter list builders.
rangeFilterBuilders=\  /atg/endeca/assembler/cartridge/manager/filter/RecordSpotlightDateRangeFilterBuilder

See the Range Filtering section for information about range filter builders.

Config

The /atg/endeca/assembler/cartridge/handler/config/RecordSpotlightConfig component, which is of class com.endeca.infront.cartridge.RecordSpotlightConfig, defines one property, fieldnames, that specifies which record fields are passed through to the content item. In this case, the field that is passed through is the product.repositoryId field, which allows the renderer to locate and render the actual products.

# Specifies which record fields will be passed through from the records to the
# resulting ContentItem
fieldNames=product.repositoryId

Note: Any property returned to the renderer must be specified in the RecordSpotlightConfig.fieldNames property and also set as a PreviewProperty in the XML template.

Initializer

The /atg/endeca/assembler/cartridge/handler/config/RecordSpotlightInitializer component, which is of class com.endeca.infront.cartridge.RecordSpotlightInitializer, sets the default configuration component to be used by the handler. As such, the defaults property in this component references the /atg/endeca/assembler/cartridge/handler/config/RecordSpotlightConfig component.

JSP Renderer

The store.war/cartridges/HorizontalRecordSpotlight/HorizontalRecordSpotlight.jsp page renders the content in the HorizontalRecordSpotlight content item. This content item contains a list of com.endeca.infront.cartridge.model.Record objects. Each Record object represents a product that has been returned by the handler and contains a Map called attributes that contains a value corresponding to the product.repositoryId key. HorizontalRecordSpotlight.jsp iterates over the list of Record objects, extracting the corresponding product.repositoryId values. After extracting the product.repositoryId values, HorizontalRecordSpotlight.jsp uses the /atg/commerce/catalog/ProductLookup component to retrieve the actual product items from the repository.

The “Featured Items” label that appears above the product spotlight row in the main content area, along with its translated versions, are stored in the StoreText repository in the horizontal_record_spotlightTitle item. The “See All” text and its translations are stored in the horizontal_record_spotlightSeeAllText item. Both may be edited in the Business Control Center.


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