Create a Search Function
Version:
Enable free text searches on a Sitecore Commerce 8.2 powered by Commerce Server and Commerce Server 11.4 website.
Complete the following prerequisites:
At 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. UseSearchNavigation.GetCatalogItemto actually search for the term, you need to pass it a search term and an instance of the options class.