Hi,
I am using the Laurenne theme, and have turned on Category Hierarchy however I have noticed that the filter drop down box for category still shows all categories and not the hierarchy.
Is this a theme issue or can I modified searchfilters?
Thanks
Richard
Hi Richard,
I thought Ramos Themes had updated all their templates with the release of Category Hierarchy support so you would need to check with them, but FYI the following is the code for generation of the categoryFilter drop-down for Category Hierarchy support which may be of assistance...
$sql1 = "SELECT DISTINCT(categoryid) FROM `".$config_databaseTablePrefix."products` WHERE ".$where.$priceWhere." AND categoryid > 0";
if (database_querySelect($sql1,$rows1))
{
$categoryids = array();
foreach($rows1 as $row)
{
$categoryids[] = $row["categoryid"];
}
if ((count($categoryids) > 1) || $categoryFilter)
{
$categories = tapestry_categoryHierarchyArray($categoryids);
print "<div class='small-12 medium-2 columns'>";
print "<label>".translate("Category")."<br />";
print "<select name='categoryFilter'>";
print "<option value=''>".translate("All")."</option>";
foreach($categories as $id => $path)
{
$selected = ($categoryFilter==$id?"selected='selected'":"");
print "<option value='".$id."' ".$selected.">".$path."</option>";
}
print "</select>";
print "</label>";
print "</div>";
}
}
Hope this helps!
Cheers,
David.
--
PriceTapestry.com