source/Application/Controller/Admin/DynamicExportBaseController.php
protected function _findDeepestCatPath($oArticle)
    {
        $sRet = "";

        // find deepest
        $aIds = $oArticle->getCategoryIds();
        if (is_array($aIds) && count($aIds)) {
            if ($aCatLvlCache = $this->_loadRootCats()) {
                $sIdMax = null;
                $dMaxLvl = 0;
                foreach ($aIds as $sCatId) {
                    if ($dMaxLvl < $aCatLvlCache[$sCatId]->ilevel) {
                        $dMaxLvl = $aCatLvlCache[$sCatId]->ilevel;
                        $sIdMax = $sCatId;
                        $sRet = $aCatLvlCache[$sCatId]->oxtitle;
                    }
                }

                // endless
                while (true) {
                    if (!isset($aCatLvlCache[$sIdMax]->oxparentid) || $aCatLvlCache[$sIdMax]->oxparentid == "oxrootid") {
                        break;
                    }
                    $sIdMax = $aCatLvlCache[$sIdMax]->oxparentid;
                    $sRet = $aCatLvlCache[$sIdMax]->oxtitle . "/" . $sRet;
                }
            }
        }

        return $sRet;
    }
protected function _findDeepestCatPath($oArticle)
    {
        $sRet = "";

        // find deepest
        $aIds = $oArticle->getCategoryIds();
        if (is_array($aIds) && count($aIds)) {
            if ($aCatLvlCache = $this->_loadRootCats()) {
                $sIdMax = null;
                $dMaxLvl = 0;
                foreach ($aIds as $sCatId) {
                    if ($dMaxLvl < $aCatLvlCache[$sCatId]->ilevel) {
                        $dMaxLvl = $aCatLvlCache[$sCatId]->ilevel;
                        $sIdMax = $sCatId;
                        $sRet = $aCatLvlCache[$sCatId]->oxtitle;
                    }
                }

                // endless
                while (true) {
                    if (!isset($aCatLvlCache[$sIdMax]->oxparentid) || $aCatLvlCache[$sIdMax]->oxparentid == "oxrootid") {
                        break;
                    }
                    $sIdMax = $aCatLvlCache[$sIdMax]->oxparentid;
                    $sRet = $aCatLvlCache[$sIdMax]->oxtitle . "/" . $sRet;
                }
            }
        }

        return $sRet;
    }
protected function _findDeepestCatPath ( $ oArticle ) { $ sRet = "" ; // find deepest $ aIds = $ oArticle -> getCategoryIds ( ) ; if ( is_array ( $ aIds ) && count ( $ aIds ) ) { if ( $ aCatLvlCache = $ this -> _loadRootCats ( ) ) { $ sIdMax = null ; $ dMaxLvl = 0 ; foreach ( $ aIds as $ sCatId ) { if ( $ dMaxLvl < $ aCatLvlCache [ $ sCatId ] -> ilevel ) { $ dMaxLvl = $ aCatLvlCache [ $ sCatId ] -> ilevel ; $ sIdMax = $ sCatId ; $ sRet = $ aCatLvlCache [ $ sCatId ] -> oxtitle ; } } // endless while ( true ) { if ( ! isset ( $ aCatLvlCache [ $ sIdMax ] -> oxparentid ) || $ aCatLvlCache [ $ sIdMax ] -> oxparentid == "oxrootid" ) { break ; } $ sIdMax = $ aCatLvlCache [ $ sIdMax ] -> oxparentid ; $ sRet = $ aCatLvlCache [ $ sIdMax ] -> oxtitle . "/" . $ sRet ; } } } return $ sRet ; }
finds deepest category path

@param \OxidEsales\Eshop\Application\Model\Article $oArticle article object

@return string
finds deepest category path