33 if ( $soxId !=
"-1" && isset( $soxId)) {
35 $oShop =
oxNew(
"oxshop" );
37 if ( !isset($isubjlang))
40 if ($isubjlang && $isubjlang > 0) {
41 $this->_aViewData[
"subjlang"] = $isubjlang;
44 $oShop->loadInLang( $isubjlang, $soxId );
46 $this->_aViewData[
"edit"] = $oShop;
52 $this->_aViewData[
'IsOXDemoShop'] =
$myConfig->isDemoShop();
53 if ( !isset( $this->_aViewData[
'updatenav'] ) ) {
57 return "shop_main.tpl";
77 $aParams[
'oxshops__oxactive'] = ( isset( $aParams[
'oxshops__oxactive'] ) && $aParams[
'oxshops__oxactive'] == true )? 1 : 0;
78 $aParams[
'oxshops__oxproductive'] = ( isset( $aParams[
'oxshops__oxproductive']) && $aParams[
'oxshops__oxproductive'] ==
true) ? 1 : 0;
81 $iLang = ( $isubjlang && $isubjlang > 0 ) ? $isubjlang : 0;
83 $oShop =
oxNew(
"oxshop" );
84 if ( $soxId !=
"-1" ) {
85 $oShop->loadInLang( $iLang, $soxId );
87 $aParams[
'oxshops__oxid'] = null;
90 if ( $aParams[
'oxshops__oxsmtp'] ) {
91 $aParams[
'oxshops__oxsmtp'] = trim($aParams[
'oxshops__oxsmtp']);
94 $oShop->setLanguage(0);
95 $oShop->assign( $aParams );
96 $oShop->setLanguage($iLang );
99 $oShop->oxshops__oxsmtppwd->setValue( $sNewSMPTPass ==
'-' ?
"" : $sNewSMPTPass );
109 $this->_aViewData[
"updatelist"] =
"1";
122 $aNonCopyVars = array(
"aSerials",
"IMS",
"IMD",
"IMA",
"sBackTag",
"sUtilModule",
"aModulePaths",
"aModuleFiles",
"aModuleEvents",
"aModuleVersions",
"aModuleTemplates",
"aModules",
"aDisabledModules");
124 $aMultiShopTables = $this->
getConfig()->getConfigParam(
'aMultiShopTables' );
125 foreach ( $aMultiShopTables as $sMultishopTable ) {
126 $aNonCopyVars[] =
'blMallInherit_' . strtolower( $sMultishopTable );
129 return $aNonCopyVars;
147 $sSelect =
"select oxvarname, oxvartype, DECODE( oxvarvalue, ".$oDB->quote(
$myConfig->getConfigParam(
'sConfigKey' ) ) .
") as oxvarvalue, oxmodule from oxconfig where oxshopid = '1'";
148 $rs = $oDB->execute( $sSelect );
149 if ($rs !=
false && $rs->recordCount() > 0) {
151 $sVarName = $rs->fields[0];
152 if (!in_array($sVarName, $aNonCopyVars)) {
153 $sID = $myUtilsObject->generateUID();
154 $sInsert =
"insert into oxconfig (oxid, oxshopid, oxvarname, oxvartype, oxvarvalue, oxmodule) values ( '$sID', ".$oDB->quote( $oShop->getId() )
155 .
", ".$oDB->quote( $rs->fields[0] )
156 .
", ".$oDB->quote( $rs->fields[1] )
157 .
", ENCODE( ".$oDB->quote( $rs->fields[2] )
158 .
", '".
$myConfig->getConfigParam(
'sConfigKey' )
160 .
", ".$oDB->quote( $rs->fields[3] ) .
" )";
161 $oDB->execute( $sInsert );
167 $sInheritAll = $oShop->oxshops__oxisinherited->value?
"true":
"false";
168 $aMultiShopTables =
$myConfig->getConfigParam(
'aMultiShopTables' );
169 foreach ( $aMultiShopTables as $sMultishopTable ) {
170 $myConfig->saveShopConfVar(
"bool",
'blMallInherit_' . strtolower($sMultishopTable), $sInheritAll, $oShop->oxshops__oxid->value);