
Originally Posted by
longstockings
Actinic is not needed but the customer is still using this Ecommerce system. Really it's just an extra step I needed to work around which took ages.
To achieve a custom category list I edited category_tree.php in includes/classes/
I changed the original sql query by adding this
and cd.categories_name LIKE '%KEYWORD%'
where KEYWORD is the word that appears in your category names that you want to show on your shop
Like this
class category_tree {
function zen_category_tree($product_type = "all") {
global $db, $cPath, $cPath_array;
if ($product_type != 'all') {
$sql = "select type_master_type from " . TABLE_PRODUCT_TYPES . "
where type_master_type = '" . $product_type . "'";
$master_type_result = $db->Execute($sql);
$master_type = $master_type_result->fields['type_master_type'];
}
$this->tree = array();
if ($product_type == 'all') {
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.parent_id = '0'
and c.categories_id = cd.categories_id
and cd.language_id='" . (int)$_SESSION['languages_id'] . "'
and c.categories_status= '1'
and cd.categories_name LIKE '%KEYWORD%'
order by sort_order, cd.categories_name";
} else {
$categories_query = "select ptc.category_id as categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " ptc
where c.parent_id = '0'
and ptc.category_id = cd.categories_id
and ptc.product_type_id = '" . $master_type . "'
and c.categories_id = ptc.category_id
and cd.language_id='" . (int)$_SESSION['languages_id'] ."'
and c.categories_status= '1'
order by sort_order, cd.categories_name";
This is just an example of one way you could accomplish this.
Hope the info is of use