34 if ($this->_aCurrSorting === null && !$sSortParameter && ($oBaseObject = $this->
getItemListBaseObject())) {
35 $sCatView = $oBaseObject->getCoreTableName();
37 $this->_aCurrSorting[$sCatView][
"oxrootid"] =
"desc";
38 $this->_aCurrSorting[$sCatView][
"oxleft"] =
"asc";
59 $iLang = $oLang->getTplLanguage();
62 $oCatTree =
oxNew(
"oxCategoryList");
63 $oCatTree->loadList();
68 $oRoot =
new stdClass();
70 $oRoot->oxcategories__oxtitle =
new oxField($oLang->translateString(
"viewAll", $iLang),
oxField::T_RAW);
73 $oRoot =
new stdClass();
75 $oRoot->oxcategories__oxtitle =
new oxField(
"-- " . $oLang->translateString(
"mainCategory", $iLang) .
" --",
oxField::T_RAW);
78 foreach ($oCatTree as $oCategory) {
79 $aNewList[] = $oCategory;
82 $oCatTree->assign($aNewList);
84 if (is_array($aFilter) && isset($aFilter[
"oxcategories"][
"oxparentid"])) {
85 foreach ($oCatTree as $oCategory) {
86 if ($oCategory->oxcategories__oxid->value == $aFilter[
"oxcategories"][
"oxparentid"]) {
87 $oCategory->selected = 1;
93 $this->_aViewData[
"cattree"] = $oCatTree;
95 return "category_list.tpl";