function _get_acategory_options($layer = 0) { $acategory_mod =& m('acategory'); $acategories = $acategory_mod->get_list(); foreach ($acategories as $key => $val) { if ($val['code'] == ACC_SYSTEM) { unset($acategories[$key]); } } import('tree.lib'); $tree = new Tree(); $tree->setTree($acategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions($layer); }
function _get_sgcategory_options() { $mod =& bm('gcategory', array('_store_id' => $this->_store_id)); $gcategories = $mod->get_list(); import('tree.lib'); $tree = new Tree(); $tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions(); }
function _get_sgcategory_options() { $mod =& bm('gcategory', array('_store_id' => $this->_store_id)); $gcategories = $mod->get_list(); //LLL 本店所有商品分类多语言 $gcategories = chg_array2_string($gcategories, 'cate_name', '', true); import('tree.lib'); $tree = new Tree(); $tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions(); }
function _get_scategory_options() { $mod =& m('scategory'); $scategories = $mod->get_list(); import('tree.lib'); $tree = new Tree(); $tree->setTree($scategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions(); }
function _get_gcategory_options($layer = 0) { $gcategory_mod =& bm('gcategory', array('_store_id' => 0)); $gcategories = $gcategory_mod->get_list(); import('tree.lib'); $tree = new Tree(); $tree->setTree($gcategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions($layer); }
function _get_scategory_options() { $mod =& m('scategory'); $scategories = $mod->get_list(); //LLL apply_app分类多语言 $scategories = chg_array2_string($scategories, 'cate_name', get_lang2(), true); import('tree.lib'); $tree = new Tree(); $tree->setTree($scategories, 'cate_id', 'parent_id', 'cate_name'); return $tree->getOptions(); }