Hide product from search if stock is low?

If I have a flag that says hide if not in stock. I still want to be able to get to the product if I have the URL.
But unable to find it in the category or in the search bar if the stock is low and the flag is set to true.

Litium version: 7.2

Hi,
Use exclude tag in your search methods. https://docs.litium.com/documentation/architecture/search/exclude-clause

Is Stock included in searchIndex? So you can exclude products that dont have stock in a specific warehouse?

Yes, there’s a method to get the tagname for the warehouse you can use.
TagNames.GetTagNameForWarehouseQuantity(inventorySystemId)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.