How can I prevent inactive Web Products to be found in Global Search?
  • 05 Sep 2022
  • 1 Minute to read
  • Dark
    Light

How can I prevent inactive Web Products to be found in Global Search?

  • Dark
    Light

Article summary

Enterprise edition

In order to hide web products in the store when buyers should no longer be able order certain products they can be deactivated. This can be done by unchecking the Active field. In that case all OrderCentral components will prevent this product to be displayed and ordered. However users can still be able to find it through the global search. This article explains how to prevent this from happing.

The feature you can utilize for this is called Restriction rules. These can be found on the Web Product configuration when browsing to the Setup -> Object Manager -> Web Product -> Restriction Rules. Follow the next steps to create a new rule:

  1. Click New Rule
  2. Enter a Name, Full Name and Description
  3. Check Is Active
  4. In User Criteria select the criteria so that it matches all your shop users (profile id, user type, etc.)
  5. In Record Criteria enter the following details
    1. Criteria Type => Record field
    2. Field => Active
    3. Operator => Equals
    4. Type => Boolean
    5. Value => False
  6. Click Save 

You can test the rule by deactivating one of the products, login to the shop and search for the specific product in the Global Search.

Ultimate edition

In order to hide web products in the store when buyers should no longer be able order certain products they can be deactivated. This can be done by unchecking the Active field. In that case all OrderCentral components will prevent this product to be displayed and ordered. However users can still be able to find it through the global search. This article explains how to prevent this from happing.

The feature you can utilize for this is called Scoping Rules. These can be found on the Web Product configuration when browsing to the Setup -> Object Manager -> Web Product -> Scoping Rules. Follow the next steps to create a new rule:

  1. Click New Rule
  2. Enter a Name, Full Name and Description
  3. Check Is Active
  4. In User Criteria select the criteria so that it matches all your shop users (profile id, user type, etc.)
  5. In Record Criteria enter the following details
    1. Criteria Type => Record field
    2. Field => Active
    3. Operator => Equals
    4. Type => Boolean
    5. Value => True
  6. Click Save 

You can test the rule by deactivating one of the products, login to the shop and search for the specific product in the Global Search.