You can filter an existing search query to refine the results based on various search terms and/or product attributes. Examples of common search filters are categories and important attributes. The filters display dynamically based on the attributes and attribute types of the products found in the original search query.
Search within results
- Enter additional keywords in the Search Within Results or Search Within Categories fields.
- Click the Search icon to filter results by the additional keywords.
Filter search results by attributes
- Select one or more checkboxes under Filters to refine the search results by specific attribute values.
- The search results automatically update based on your selections.
Filter search results by previously purchased products
You must set the Enable Boosting by Purchase History toggle to Yes to see the Allow Purchase History Filtering setting. This setting does not display for guest users.
- Enable the Allow Purchase History Filtering setting under Administration > System > Settings to add a Previously Purchased facet below the Search Within Results or Search Within Category sections on the search results or category list pages. Default value: Yes.
- Select the Previously Purchased checkbox to filter the search results or category list to show only products that the customer bill-to has purchased before (based on order line frequency, not quantity), based on the order data in the order history table.
Filter search results by stocked items only products
You must first set products as stocked. You can do this manually on the product record (set the Is Stocked toggle to ON on the Details finger tab). You can also use the product import template and setting the IsStocked field to true (this is optional in the template and is under the green Selling Rules section with the description "Whether or not this item is regularly stocked at a local warehouse. Can be used as a facet on the storefront.")
- Enable the Display Facets for StockedItems setting under Administration > System > Settings to add a Stocked Items Only facet under the Stocked Items heading. When enabled, customers can select items set as normally stocked in warehouses. Default value: No.
- Select the Stocked Items Only checkbox to filter the search results or category list to show only stocked products (or where the IsStocked field is set to true on the product record).
The Is Stocked toggle is not related to inventory, but instead is meant to differentiate local warehouse products from drop-ship products, regardless of inventory.
Share filtered search results
If you want the ability to share filtered search results, you or your partner must first update your theme to have the getQueryStringValues and updateSearchQuery functions in the insite.product-list.controller.ts file.
- Copy the URL after applying facets to a product list (either search results or a category product list) to share filtered search results. The URL updates to include the selected facets.
- Share the URL and/or save and return to it to see the filtered list of products.
Sort results
You can use sorting options to filter the product list.
Configured Commerce offers a few sorting options out of the box:
-
Best Match – Sorts products descending based on their search score. For troubleshooting search results, you can view scores in the CMS. Click Settings > Enable Search Data Mode.
The score and its explanation are displayed on the search results page.
You can boost or bury products with options configurable in the Admin Console under Marketing > Search: Field/Query/Product/Category/Brand/Product Line boosting. See Boost and bury search results for information.
- A-Z – Sorts products and categories alphabetically, either ascending (A-Z) or descending (Z-A).
- Price (Classic only) – Sorts products by price, ascending or descending.
You or your partner can customize your instance of Configured Commerce with additional sorting options such as Most Popular.
Please sign in to leave a comment.