Script: Class dw.suggest.ProductSuggestions

Class ProductSuggestions

The product suggestion container provides access to products found using the suggested terms. The method getSuggestedProducts() can be used to get the list of found products.

Furthermore the list of suggested terms, after processing the original user input search query, is accessible through SearchPhraseSuggestions.getSuggestedTerms() method.

Properties

suggestedProducts : Iterator Read Only

This method returns a list of products which were found using the suggested terms as search criteria. The product lookup is being executed in the current catalog and locale.

Constructor Summary

This class does not have a constructor, so you cannot create it directly.

Method Summary

getSuggestedProducts() : Iterator

This method returns a list of products which were found using the suggested terms as search criteria.

Methods inherited from class Suggestions

getSearchPhraseSuggestions, getSuggestedPhrases, getSuggestedTerms, hasSuggestedPhrases, hasSuggestedTerms, hasSuggestions

Methods inherited from class Object

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Method Detail

getSuggestedProducts

getSuggestedProducts() : Iterator

This method returns a list of products which were found using the suggested terms as search criteria. The product lookup is being executed in the current catalog and locale.

Returns:

a iterator containing a SuggestedProduct instance for each found product, the iterator might be empty

See Also:

Suggestions.hasSuggestions()