HIDE_NOT_AVAILABLE is the setting of the component to show or products that are not available for order. After enabling this option, you may encounter the following problems:
- In the store settings there is a tick "allow to buy products with a negative amount"
- The same tick is in the product
- There is a main product, but out of stock there are no trade offers; the products will be shown in the list.
- There is no quantity of the main product, but there are commercial offers - the goods will not be listed.
I think the best option in this situation is to add the “goods in stock” property. Output in the filter. Check the value in the complex component after the filter. Code:
/* компонент catalog.smart.filter */ <? global $arrFilter; if($arrFilter["PROPERTY_X"] == "Y") $arrFilter[">CATALOG_QUANTITY"] = 0; ?> /* компонент catalog.section */
And when changing goods, fill this property, and if there is integration with 1C, then do another check on the krone.
This option will allow the filter to work "as it should." CNC, ajax caching, etc. will work. Plus, it gives us additional opportunities to manage the quantity - there are situations when the product is considered unavailable, it is less than 10, for example, or we can configure this parameter for partitions separately.