Category drop down shows all items
When you use the category drop down (the categories.php include) in your catalog, the system shows all items under a category, even if it's a main level category. That's the expected response; we've set that up on purpose to allow store owners to view all items in a main category if they wish.
If you'd rather change this so that the system shows subcategories when you select a main category from the drop down box, you'll need to make some changes to the PHP code. If you decide to do this, please note that you can cause errors to the system easily, so be sure to make a backup of the file first! We *cannot* recover lost files or fix things if something goes wrong after applying this change.
Open the openinfo.php page in the /inc/ folder, and find the line:
include("inc/open.php");
Just under that line, add the code:
if (isset($_POST['category']))
{
$catval = ereg_replace("[^a-zA-Z0-9 -&_]", "", $_POST['category']);
$pquery = "SELECT COUNT(ID) FROM Shop_Categories WHERE Parent='$catval'";
$presult = mysql_query($pquery) or die ("Unable to select your system variables. Try again later.");
$prow = mysql_fetch_row($presult);
if ($prow[0] > 0)
{
$category = "";
$maincat = $catval;
}
}
just as it looks above. Save the file and reload to the site, and the system should now show the subcategories instead of the main ones.