My Oracle Support Banner

How to Remove Out Of Stock Products From Search Results, Hide OutOfStock Products (Doc ID 2171379.1)

Last updated on MAY 02, 2023

Applies to:

Oracle Commerce Cloud Service - Version 21.1.1 and later
Information in this document applies to any platform.


To hide products that are Out of Stock (stockStatus OUT_OF_STOCK) from search results pages (PLPs).

You may have a business requirement not to show products that are Out of Stock.  Several situations need to be considered.  For instance, should this rule apply to viewing products that are referenced by old orders? Customers may want to view the contents of their orders. Naturally some products belonging to old orders may be entirely discontinued, but it is necessary for the site to display these. Bookmarked links to product pages should also be considered. Will products not be displayed when these requests are made? 

With OOTB (Out of the Box) version, on PDP (Product Detail Page), Storefront calls getStockStatus endpoint (GET /ccstore/v1/stockStatus/{id}) to check if an item is OUTOFSTOCK or INSTOCK so that stock status can be displayed and prevent shoppers from adding OUTOFSTOCK item to cart, however for PLP (Product Listing Page), this is not done.  This document focuses on PLP and provides suggestions.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.