I have a need to put sub categories (and sub sub categories) to my cart. I'm sure I can just add it to the inventory list. My question is how to change the menu that displays on the left to show both categories, sub categories and sub sub categories.
global $conn;
global $dal;
$message = "<b>Catalog</b><br>";
//$str = "select Category_id, Category_class from sccategories";
$rs = $dal->sccategories->QueryAll();
while ($data = db_fetch_array($rs))
{
$str2 = "select count(Item) from scinventory where Category_id='".str_replace("'","\'",$data["Category_id"])."'";
$rs2 = CustomQuery($str2);
$data2 = db_fetch_numarray($rs2);
if ($data2[0])
if (@$_REQUEST["a"]=="search" && @$_REQUEST["SearchFor"]==$data["Category_id"])
$message.= "<a href=\"scinventory_list.php?a=search&value=1&SearchFor=".htmlspecialchars(rawurlencode($data["Category_id"]))."&SearchOption=Contains&SearchField=Category_id\"><b>".ucfirst($data["Category_class"])." (".$data2[0].") </b></a><br>";
else
$message.= "<a href=\"scinventory_list.php?a=search&value=1&SearchFor=".htmlspecialchars(rawurlencode($data["Category_id"]))."&SearchOption=Contains&SearchField=Category_id\">".ucfirst($data["Category_class"])." (".$data2[0].") </a><br>";
}
$message.= "<br><a href=\"scinventory_list.php?a=search&value=1&SearchFor=&SearchOption=Contains&SearchField=Category_id\">Show all</a><br>";
echo $message;
Thanks for assistance.