Including products is another kind of promotion that is when you want to show some products in the search results, and you want only them to appear, and if they are not found, then nothing should appear in the search results. Include or Exclude rules can be applied globally for all the searches (site rule), specific search queries (search rule), or certain categories (category rule) which are browsed by the customers.
For example, you want to show only the products that have a 50% discount or more, when a customer comes to your website looking for any products. You can add an include rule with a condition that says ‘discount greater than or equal to 50’ and save the rule.
Exclude is the opposite of include, which is when you want to remove certain products from the search results, then you can add a condition that matches those products with an exclude rule.
For example, if you don’t want the products to appear in search results that contain alcohol in ingredients, then you can add the condition ‘ingredients contains alcohol’ with exclude operation, and you will see that alcoholic products will not be shown in the search results.
How to apply the include or exclude rule?
- Add a rule by following the steps given in this article.
- Now when you add a sub-rule, choose the Include or Exclude option in the Operation field.
- Configure a condition to match products.
- Select a field or attribute of a product like a name, color, price, etc., then choose a condition that can be either of the following:
- Equals to
- Contains
- Greater than
- Less than
- Greater than or equal to
- Less than or equal to
-
Set a comparison value, which should complete the condition like “Pattern Contains Plain”.
-
Add more conditions to the attributes by repeating the steps and clicking on the Add button in the rule configuration section.
- After you’re done, set a duration and click on the Save button to save this rule and make it active on your store.
-
For the Include rule, only plain dresses will be displayed in the results and for Exclude rule, the plain dresses will be removed from the search results.