Answer the question
In order to leave comments, you need to log in
How to display in the search only products in stock?
Has anyone done in the Bitrix search component search.page the output of only goods in stock? I tried to display in the component the output of a very large number of results per page at once and filter out what is missing in result_modifier.php, but this slowed down the page loading quite a lot. In especially large samples, nothing but 504 errors could be obtained.
Answer the question
In order to leave comments, you need to log in
Use the OnReindex event and at the time of re-indexing the product, check whether the product is available, if it is not, then do not add it to the search index.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question