Out of stock items show on home or main catalog page (v. 2.94 Build 1 - 4)
Out of stock items should not appear when the Out of Stock setting in the Catalog Setup is set to No. However, items are erroneously appearing when viewing the home page or the main catalog page, when Show Products is set to a product type (New Products, Featured Products, Sale Products, Random Products).
This will be corrected in the next build. For now:
-
Open the catalog.php file in the /enc/ folder.
-
Add the code:
if ($Show_OOS == "No")
$searchquery .= " AND OutOfStock='No' AND (Inventory IS NULL OR Inventory > 0)";just above the code:
if ($catalogproducts == "new")
-
Save and reload the file.