source/Core/Config.php
protected function _loadVarsFromDb($shopID, $onlyVars = null, $module = '')
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $moduleSql = $module ? " oxmodule LIKE " . $db->quote($module . "%") : " oxmodule='' ";
        $onlyVarsSql = $this->_getConfigParamsSelectSnippet($onlyVars);

        $select = "select
                        oxvarname, oxvartype, " . $this->getDecodeValueQuery() . " as oxvarvalue
                    from oxconfig
                    where oxshopid = '$shopID' and " . $moduleSql . $onlyVarsSql;

        $result = $db->getAll($select);

        foreach ($result as $value) {
            $varName = $value[0];
            $varType = $value[1];
            $varVal = $value[2];

            $this->_setConfVarFromDb($varName, $varType, $varVal);

            //setting theme options array
            if ($module) {
                $this->_aThemeConfigParams[$varName] = $module;
            }
        }

        return (bool) count($result);
    }
protected function _loadVarsFromDb($shopID, $onlyVars = null, $module = '')
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $moduleSql = $module ? " oxmodule LIKE " . $db->quote($module . "%") : " oxmodule='' ";
        $onlyVarsSql = $this->_getConfigParamsSelectSnippet($onlyVars);

        $select = "select
                        oxvarname, oxvartype, " . $this->getDecodeValueQuery() . " as oxvarvalue
                    from oxconfig
                    where oxshopid = '$shopID' and " . $moduleSql . $onlyVarsSql;

        $result = $db->getAll($select);

        foreach ($result as $value) {
            $varName = $value[0];
            $varType = $value[1];
            $varVal = $value[2];

            $this->_setConfVarFromDb($varName, $varType, $varVal);

            //setting theme options array
            if ($module) {
                $this->_aThemeConfigParams[$varName] = $module;
            }
        }

        return (bool) count($result);
    }
protected function _loadVarsFromDb ( $ shopID , $ onlyVars = null , $ module = '' ) { $ db = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ moduleSql = $ module ? " oxmodule LIKE " . $ db -> quote ( $ module . "%" ) : " oxmodule='' " ; $ onlyVarsSql = $ this -> _getConfigParamsSelectSnippet ( $ onlyVars ) ; $ select = "select
                        oxvarname, oxvartype, " . $ this -> getDecodeValueQuery ( ) . " as oxvarvalue
                    from oxconfig
                    where oxshopid = '$shopID' and " . $ moduleSql . $ onlyVarsSql ; $ result = $ db -> getAll ( $ select ) ; foreach ( $ result as $ value ) { $ varName = $ value [ 0 ] ; $ varType = $ value [ 1 ] ; $ varVal = $ value [ 2 ] ; $ this -> _setConfVarFromDb ( $ varName , $ varType , $ varVal ) ; //setting theme options array if ( $ module ) { $ this -> _aThemeConfigParams [ $ varName ] = $ module ; } } return ( bool ) count ( $ result ) ; }
Load config values from DB

@param string $shopID   shop ID to load parameters
@param array  $onlyVars array of params to load (optional)
@param string $module   module vars to load, empty for base options

@return bool
Load config values from DB