Zen Cart Ver 1.54
http://homepromedical.com/zc154_test/
I'm currently trying to implement "Simple Category Tree," on testing site. However, I wonder if I can do this?
Because what it is currently looks is like this...
I tried to look at codes and it seems that the commented out SQL is the one that I needed.
However, I tried to no available and still does not work.
PHP Code:
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.categories_id = cd.categories_id
and c.categories_status=1 " .
// "and c.categories_id = ptc.category_id " .
// "and ptc.category_id = cd.categories_id " .
// "and ptc.product_type_id not in " . $this->document_types_list . "
" and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
order by c.parent_id, c.sort_order, cd.categories_name";
$categories = $db->Execute($categories_query);
while (!$categories->EOF) {
$this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
$categories->MoveNext();
}
Sincerely, PanZC2020 (May 27th, 2015)
Bookmarks