Create a Search Function
Version:
Enable free text searches on a Sitecore Commerce 8.1 powered by Commerce Server and Commerce Server 11.3 website.
Complete the following prerequisites:
In your Visual Studio solution setup:
-
Use
SearchHelpers.GetFacetFieldsForItemto retrieve facets for this page. -
Use
SearchHelpers.GetSortFieldsForItemto get any specific sort fields that are expected to be used on this page. -
Use
SearchHelpers.GetFacetFieldsForItemto retrieve facets for this page. -
Create an instance of the
CommerceSearchOptionsclass.Use
SearchNavigation.GetCatalogItemto actually search for the term. You need to pass it a search term and an instance of the options class.