source/Application/Model/Category.php
public static function getRootId($sCategoryId)
    {
        if (!isset($sCategoryId)) {
            return;
        }
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        return $oDb->getOne('select oxrootid from ' . getViewName('oxcategories') . ' where oxid = ' . $oDb->quote($sCategoryId));
    }
public static function getRootId($sCategoryId)
    {
        if (!isset($sCategoryId)) {
            return;
        }
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        return $oDb->getOne('select oxrootid from ' . getViewName('oxcategories') . ' where oxid = ' . $oDb->quote($sCategoryId));
    }
public static function getRootId ( $ sCategoryId ) { if ( ! isset ( $ sCategoryId ) ) { return ; } $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; return $ oDb -> getOne ( 'select oxrootid from ' . getViewName ( 'oxcategories' ) . ' where oxid = ' . $ oDb -> quote ( $ sCategoryId ) ) ; }
Returns root category id of a child category

@param string $sCategoryId category id

@return integer
Returns root category id of a child category