This section describes additions and modifications to the category
item descriptor.
feature and myFeature
The feature
and myFeature
properties work together to ensure that a promotional image, such as the one below for the Registered Users – Save 15% on Home Accents promotion, is always returned for a category:
A category’s myFeature
property contains a promotional image, in the form of a promotionalContent
item. feature
is a derived property that looks at the myFeature
property of the current category to find a promotional image. If the current category’s myFeature
property is null, feature
looks at the feature
property of the category’s parent, effectively repeating the process with the parent. That is, it looks at the parent’s myFeature
property and, if the property is null, it proceeds to the feature
property for the parent’s parent. Using this methodology, a call for a category’s promotional image will move up the category tree until it finds a promotional image. Note that it is the feature
property that is used in the Commerce Reference Store JSP code.
The feature
property is used on the Endeca-driven category page. This page includes a HeaderBanner-ATGCategory
cartridge that renders all parts of the header banner, including the category title, a hero image, and the promotional content item specified by the category’s feature
property, as shown below:
The handler for the HeaderBanner-ATGCategory
cartridge is responsible for retrieving all of the header content from the catalog repository and passing that content to the cartridge’s JSP renderer. See the HeaderBanner-ATGCategory section in the Using Cartridges chapter for more details on the HeaderBanner-ATGCategory
cartridge.
Note: promotionalContent
is a Commerce Reference Store-specific item type. For detailed information, see Custom Item Descriptors in the Catalog Repository.
heroImage
heroImage
stores a splash image for the category in the form of a media
item. The heroImage
property is used on the Endeca-driven category page. This page includes a HeaderBanner-ATGCategory
cartridge that renders all parts of the header banner, including the category title, a hero image, and the category’s promotional content item, as shown below:
The handler for the HeaderBanner-ATGCategory
cartridge is responsible for retrieving all of the header content from the catalog repository and passing that content to the cartridge’s JSP renderer. See the HeaderBanner-ATGCategory section in the Using Cartridges chapter for more details on the HeaderBanner-ATGCategory
cartridge.
relatedProducts
relatedProducts
stores a list of items of type product
that represent a set of products in a category. The store.war/navigation/gadgets/catalog.jsp
gadget uses relatedProducts
to populate the list of featured products that appear in the menu bar. When you click a category in the menu bar, you see a menu with a list of subcategories down the left and a list of related products down the right.
Commerce Reference Store also ships with a cartridge that uses the relatedProducts
property to render a set of related product images in the main content area of the category page. This cartridge, however, is not used out of the box. To get more information for it, refer to the ProductSpotlight-ATGCategoryRelatedProducts section of the Using Cartridges chapter.