In order to limit the number of properties returned for products and SKUs in the ResultsList content item, the application module can specify the properties to be retrieved in the fieldNames property of the /atg/endeca/assembler/cartridge/handler/config/ResultsListConfig component, for example:

fieldNames+=\
  product.baseUrl,\
  product.repositoryId,\
  product.displayName,\
  product.largeImage.url,\
  sku.activePrice

subRecordFieldNames+=\
  sku.activePrice

Using the above configuration, the product and SKU properties in the content item are returned in the following format:

"product.repositoryId": [
    "xprod2517"
],
"product.baseUrl": [
    "atgrep:/ProductCatalog/clothing-sku/xsku2517_4"
],
"sku.activePrice": [
    "36.000000"
],
"product.displayName": [
    "Cargo Pants"
],
"product.largeImage.url": [
    "/csadocroot/content/images/products/large/APP_CargoPants_large.jpg"
]

The application module can also specify the sorting options to include for the results lists using the sorters property of the /atg/endeca/assembler/cartridge/handler/config/ResultsList component.

sorters=\
  /atg/endeca/assembler/cartridge/sort/Relevance,\
  /atg/endeca/assembler/cartridge/sort/NameAscending,\
  /atg/endeca/assembler/cartridge/sort/NameDescending,\
  /atg/endeca/assembler/cartridge/sort/PriceAscending,\
  /atg/endeca/assembler/cartridge/sort/PriceDescending

The sorters property specifies a number of sorter components, for example, the NameAscending component, which specifies that the results list should be sorted according to the product’s display name property in ascending order.

class=atg.projects.store.assembler.cartridge.handler.model.
LocalizableSortOptionConfig
$scope=request

# The default label.
label=A-Z

# Sort by name ascending. In the case where items have the same name, sort
# by price ascending.
value=product.displayName|0||sku.activePrice|0

Out of the box, the label displayed for the NameAscending sorting option in the sort menu is A-Z, however, this label should be locale-specific. To add a locale-specific label for this sort option, a localized resource is specified using the localizedLabelKey property of the /atg/endeca/assembler/cartridge/handler/config/ResultsList component.

# The localized resource label key.
localizedLabelKey=sort.nameAZ

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