The Salesforce B2C Commerce Search module enables you to exclude unavailable products from search results in the storefront at the site level and at the product level. This is to avoid frustrating customers by showing them products they can't purchase.
The site-level feature, describe here, is only useful for sites that use an inventory list to control availability. The deprecated in-stock product attribute doesn't control the availability.
A product is considered available if one of the following is true:
ATS > 0
,
orInventory records for base products have no effect on whether or not they appear in search results because the availability of such products is determined by the availability of their variation products. The same is true for product-sets. Bundled products are available if one of the following is true:
ATS >
0
.To remove unavailable products from searches:
If a merchant requires the flexibility to show or hide unavailable
products per query, the Business Manager Show Orderable Products Only option might be
overridden programmatically. The Search pipelet offers an optional input parameter,
OrderableProductsOnly
, which can be used to specify the desired behavior.
The class dw.catalog.ProductSearchModel
, has a similar property.