Keyword search shows more pages than items (v. 2.62)
This bug shows additional pages when you use keywords to display items. This is an issue related to the 2.62 beta, and has been corrected in 2.7.
To correct this in earlier releases:
-
Open the openinfo.php page in the /enc/ directory.
-
Remove the lines:
if (!empty($_REQUEST['keyword'])) $searchquery .= "LEFT JOIN " .$DB_Prefix ."_options ON " .$DB_Prefix ."_items.ID=ItemID ";
-
Change the line:
$searchquery .= " AND (Inventory IS NULL OR Inventory > 0)";
to:
$searchquery .= " AND OutOfStock='No' AND (Inventory IS NULL OR Inventory > 0)";
-
Change the line:
$searchquery .= " AND (Item LIKE '%$keyword%' OR Keywords LIKE '%$keyword%' OR Attributes LIKE '%$keyword%')";
to:
$searchquery .= " AND (Item LIKE '%$addkeyword%' OR Keywords LIKE '%$addkeyword%' OR Catalog == '$addkeyword')";
-
Change the line:
$searchquery .= "(Item LIKE '%$addlterm%' OR Keywords LIKE '%$addlterm%' OR Attributes LIKE '%$addlterm%')";
to:
$searchquery .= "(Item LIKE '%$addlterm%' OR Keywords LIKE '%$addlterm%' OR Catalog = '$addlterm')";