Note: For custom catalogs, see the Using Custom Catalogs chapter in the ATG Commerce Programming Guide. For additional search information, see the Using Search Forms chapter in the ATG Page Developer’s Guide.

You can provide searching mechanisms to enable customers to find products in the catalog that satisfy a set of criteria. ATG Commerce provides the form handler class atg.commerce.catalog.SearchFormHandler to search the catalog repository for items such as products and categories. You can use this form handler to construct searches for one or more catalog item types, and you can specify which properties to examine when searching.

For example, you can search for products that contain a specified substring in their names, or for categories that are tagged with a specified keyword, or for both products and categories that have a specified set of property values.

Configuration settings in the form handler’s properties file specify the kinds of elements to search for, the properties of those elements to consider when searching, and additional configuration details for each type of search. Typically, customers specify target values to search for through form fields in a JSP.

The SearchFormHandler class should provide sufficient search functionality and flexibility for most sites. ATG Commerce includes several SearchFormHandler components in /atg/commerce/catalog, each one configured for a different set of search options (see Preconfigured Search Components). You can create additional SearchFormHandler components and configure them through their properties files or through the Component Editor in the ACC. If your store requires custom search capabilities, you can extend SearchFormHandler or write another form handler.

loading table of contents...