Create an unordered list for search links
There is not a way to do this using Cartweaver out of the box, but with a simple modification of
CWSearch.php you can do it. Find the switch/case section and add a new case
statement. Currently there is a case "LINKS" and a case "FORM". Add this case statement
immediately after the switch line:
/* SEARCH BY LIST */
case "LIST":
echo("<ul>");
if($this->allcategorieslabel != "") {
echo("<li><a href=\"" . $this->actionpage . "?category=0\">" . $this->allcategorieslabel . "</a></li>");
}
while ($row_rsCWGetCategories = $this->db->db_fetch_assoc($rsCWGetCategories)) {
if($this->urlcategory == $row_rsCWGetCategories['category_ID']) {
echo($this->selectedStart);
}
echo("<li><a href=\"" . $this->actionpage . "?category=" . $row_rsCWGetCategories['category_ID'] . "\">" . $row_rsCWGetCategories['category_Name'] . "</a></li>");
}
echo("</ul>");
break;
Then, on any page where you want to use the list, call it like this:
<?php
$cwSearchObj = new CWSearch($cartweaver);
$cwSearchObj->setSearchType("LIST");
$cwSearchObj->setCategory("YES");
$cwSearchObj->setAllCategoriesLabel("All Products");
$cwSearchObj->display();
?>