In this lesson, a filtering search rule is created
and tested that uses the inventory index to filter out products with
no inventory. The search rule is created in the Management Center
and tested in the storefront.
Procedure
- Open the Marketing tool.
- Select the target store. For example, Aurora.
- Create and name a search rule that uses the Add
or Replace Search Criteria action.
- Go to the Add or Replace Search Criteria tab and add the
new search filter:
- Select Property from the create
new filter drop down.
- Under the Name field, select Inventory.
- Under the Matching rule field,
select Greater than.
- Under the Value field, enter 0.
The resulting search rule should resemble the following
screen capture:
- Save the search rule.
The search rule ensures
that only products with an inventory level greater than zero will
be displayed in the search results page.
- Verify the search rule in the storefront.
- Go to the storefront and perform a search for sofa.
The search results page contains 9 search results:
- Activate the search rule, and then perform the same
search again in the storefront for sofa.
This time, the search results page contains only 8
results because the Supreme GiantsCorner Sofa Set is
out of stock: