source/Application/Controller/Admin/ShopMain.php
protected function _copyConfigVars($shop)
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $utilsObject = \OxidEsales\Eshop\Core\Registry::getUtilsObject();
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $nonCopyVars = $this->_getNonCopyConfigVars();

        $selectShopConfigurationQuery =
            "select oxvarname, oxvartype,
            DECODE( oxvarvalue, " . $db->quote($config->getConfigParam('sConfigKey')) . ") as oxvarvalue, oxmodule
            from oxconfig where oxshopid = '1'";
        $shopConfiguration = $db->select($selectShopConfigurationQuery);
        if ($shopConfiguration != false && $shopConfiguration->count() > 0) {
            while (!$shopConfiguration->EOF) {
                $configName = $shopConfiguration->fields[0];
                if (!in_array($configName, $nonCopyVars)) {
                    $newId = $utilsObject->generateUID();
                    $insertNewConfigQuery =
                        "insert into oxconfig
                        (oxid, oxshopid, oxvarname, oxvartype, oxvarvalue, oxmodule) values ( '$newId', " . $db->quote($shop->getId())
                        . ", " . $db->quote($shopConfiguration->fields[0])
                        . ", " . $db->quote($shopConfiguration->fields[1])
                        . ",  ENCODE( " . $db->quote($shopConfiguration->fields[2])
                        . ", '" . $config->getConfigParam('sConfigKey')
                        . "')"
                        . ", " . $db->quote($shopConfiguration->fields[3]) . " )";
                    $db->execute($insertNewConfigQuery);
                }
                $shopConfiguration->fetchRow();
            }
        }

        $inheritAll = $shop->oxshops__oxisinherited->value ? "true" : "false";
        $multiShopTables = $config->getConfigParam('aMultiShopTables');
        foreach ($multiShopTables as $multishopTable) {
            $config->saveShopConfVar("bool", 'blMallInherit_' . strtolower($multishopTable), $inheritAll, $shop->oxshops__oxid->value);
        }
    }
protected function _copyConfigVars($shop)
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $utilsObject = \OxidEsales\Eshop\Core\Registry::getUtilsObject();
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $nonCopyVars = $this->_getNonCopyConfigVars();

        $selectShopConfigurationQuery =
            "select oxvarname, oxvartype,
            DECODE( oxvarvalue, " . $db->quote($config->getConfigParam('sConfigKey')) . ") as oxvarvalue, oxmodule
            from oxconfig where oxshopid = '1'";
        $shopConfiguration = $db->select($selectShopConfigurationQuery);
        if ($shopConfiguration != false && $shopConfiguration->count() > 0) {
            while (!$shopConfiguration->EOF) {
                $configName = $shopConfiguration->fields[0];
                if (!in_array($configName, $nonCopyVars)) {
                    $newId = $utilsObject->generateUID();
                    $insertNewConfigQuery =
                        "insert into oxconfig
                        (oxid, oxshopid, oxvarname, oxvartype, oxvarvalue, oxmodule) values ( '$newId', " . $db->quote($shop->getId())
                        . ", " . $db->quote($shopConfiguration->fields[0])
                        . ", " . $db->quote($shopConfiguration->fields[1])
                        . ",  ENCODE( " . $db->quote($shopConfiguration->fields[2])
                        . ", '" . $config->getConfigParam('sConfigKey')
                        . "')"
                        . ", " . $db->quote($shopConfiguration->fields[3]) . " )";
                    $db->execute($insertNewConfigQuery);
                }
                $shopConfiguration->fetchRow();
            }
        }

        $inheritAll = $shop->oxshops__oxisinherited->value ? "true" : "false";
        $multiShopTables = $config->getConfigParam('aMultiShopTables');
        foreach ($multiShopTables as $multishopTable) {
            $config->saveShopConfVar("bool", 'blMallInherit_' . strtolower($multishopTable), $inheritAll, $shop->oxshops__oxid->value);
        }
    }
protected function _copyConfigVars ( $ shop ) { $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ utilsObject = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsObject ( ) ; $ db = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ nonCopyVars = $ this -> _getNonCopyConfigVars ( ) ; $ selectShopConfigurationQuery = "select oxvarname, oxvartype,
            DECODE( oxvarvalue, " . $ db -> quote ( $ config -> getConfigParam ( 'sConfigKey' ) ) . ") as oxvarvalue, oxmodule
            from oxconfig where oxshopid = '1'" ; $ shopConfiguration = $ db -> select ( $ selectShopConfigurationQuery ) ; if ( $ shopConfiguration != false && $ shopConfiguration -> count ( ) > 0 ) { while ( ! $ shopConfiguration -> EOF ) { $ configName = $ shopConfiguration -> fields [ 0 ] ; if ( ! in_array ( $ configName , $ nonCopyVars ) ) { $ newId = $ utilsObject -> generateUID ( ) ; $ insertNewConfigQuery = "insert into oxconfig
                        (oxid, oxshopid, oxvarname, oxvartype, oxvarvalue, oxmodule) values ( '$newId', " . $ db -> quote ( $ shop -> getId ( ) ) . ", " . $ db -> quote ( $ shopConfiguration -> fields [ 0 ] ) . ", " . $ db -> quote ( $ shopConfiguration -> fields [ 1 ] ) . ",  ENCODE( " . $ db -> quote ( $ shopConfiguration -> fields [ 2 ] ) . ", '" . $ config -> getConfigParam ( 'sConfigKey' ) . "')" . ", " . $ db -> quote ( $ shopConfiguration -> fields [ 3 ] ) . " )" ; $ db -> execute ( $ insertNewConfigQuery ) ; } $ shopConfiguration -> fetchRow ( ) ; } } $ inheritAll = $ shop -> oxshops__oxisinherited -> value ? "true" : "false" ; $ multiShopTables = $ config -> getConfigParam ( 'aMultiShopTables' ) ; foreach ( $ multiShopTables as $ multishopTable ) { $ config -> saveShopConfVar ( "bool" , 'blMallInherit_' . strtolower ( $ multishopTable ) , $ inheritAll , $ shop -> oxshops__oxid -> value ) ; } }
Copies base shop config variables to current

@param \OxidEsales\Eshop\Application\Model\Shop $shop new shop object
Copies base shop config variables to current