A category or product can be the child of more than one category. Specifying multiple parent categories makes the catalog more flexible, but can complicate navigation. This is especially true if the customer accesses a category or product through a search facility rather than by traversing the catalog hierarchy; if the customer then wants to move up the hierarchy, you need to determine which parent category to move to. You can use the parentCategory property of the category and product items to specify a default parent category for this purpose.

In custom catalogs, a product can have different parentCategories for each catalog in which the product appears. To facilitate this feature, parentCategory is a derived property in custom catalogs The value it returns is the parentCategory of the productInfo object that is mapped to the user’s current catalog..

For example, suppose you have a link on each page that takes the customer up one level in the catalog hierarchy. If customer views a product that has multiple parent categories, your site can track which parent category the customer accessed the product from, and make this link point back to that category. But if the customer finds the product by searching rather than navigating through the catalog hierarchy, you can have the link point to the category specified by the parentCategory property.

If your catalog uses a different name for the parentCategory property, set the parentCategoryPropertyName property in the /atg/commerce/catalog/CatalogTools.properties file to the actual name of the property. For example:

parentCategoryPropertyName=higherCategory

CatalogTools uses parentCategory to determine the ancestor categories of a product or category.

 
loading table of contents...