source/Application/Controller/Admin/ShopMain.php
public function save()
    {
        parent::save();

        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $shopId = $this->getEditObjectId();

        $parameters = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $user = $this->getUser();
        $shopId = $this->updateShopIdByUser($user, $shopId, false);

        //  #918 S
        // checkbox handling
        $parameters['oxshops__oxactive'] = (isset($parameters['oxshops__oxactive']) && $parameters['oxshops__oxactive'] == true) ? 1 : 0;
        $parameters['oxshops__oxproductive'] = (isset($parameters['oxshops__oxproductive']) && $parameters['oxshops__oxproductive'] == true) ? 1 : 0;

        $subjLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("subjlang");
        $shopLanguageId = ($subjLang && $subjLang > 0) ? $subjLang : 0;

        $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
        if ($shopId != self::NEW_SHOP_ID) {
            $shop->loadInLang($shopLanguageId, $shopId);
        } else {
            $parameters = $this->updateParameters($parameters);
        }

        if ($parameters['oxshops__oxsmtp']) {
            $parameters['oxshops__oxsmtp'] = trim($parameters['oxshops__oxsmtp']);
        }

        $shop->setLanguage(0);
        $shop->assign($parameters);
        $shop->setLanguage($shopLanguageId);

        if (($newSMPTPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxsmtppwd"))) {
            $shop->oxshops__oxsmtppwd->setValue($newSMPTPass == '-' ? "" : $newSMPTPass);
        }

        $canCreateShop = $this->canCreateShop($shopId, $shop, $config);
        if (!$canCreateShop) {
            return;
        }

        try {
            $shop->save();
        } catch (\OxidEsales\Eshop\Core\Exception\StandardException $e) {
            $this->checkExceptionType($e);
            return;
        }

        $this->_aViewData["updatelist"] = "1";

        $this->updateShopInformation($config, $shop, $shopId);

        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("actshop", $shopId);
    }
public function save()
    {
        parent::save();

        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $shopId = $this->getEditObjectId();

        $parameters = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $user = $this->getUser();
        $shopId = $this->updateShopIdByUser($user, $shopId, false);

        //  #918 S
        // checkbox handling
        $parameters['oxshops__oxactive'] = (isset($parameters['oxshops__oxactive']) && $parameters['oxshops__oxactive'] == true) ? 1 : 0;
        $parameters['oxshops__oxproductive'] = (isset($parameters['oxshops__oxproductive']) && $parameters['oxshops__oxproductive'] == true) ? 1 : 0;

        $subjLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("subjlang");
        $shopLanguageId = ($subjLang && $subjLang > 0) ? $subjLang : 0;

        $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
        if ($shopId != self::NEW_SHOP_ID) {
            $shop->loadInLang($shopLanguageId, $shopId);
        } else {
            $parameters = $this->updateParameters($parameters);
        }

        if ($parameters['oxshops__oxsmtp']) {
            $parameters['oxshops__oxsmtp'] = trim($parameters['oxshops__oxsmtp']);
        }

        $shop->setLanguage(0);
        $shop->assign($parameters);
        $shop->setLanguage($shopLanguageId);

        if (($newSMPTPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxsmtppwd"))) {
            $shop->oxshops__oxsmtppwd->setValue($newSMPTPass == '-' ? "" : $newSMPTPass);
        }

        $canCreateShop = $this->canCreateShop($shopId, $shop, $config);
        if (!$canCreateShop) {
            return;
        }

        try {
            $shop->save();
        } catch (\OxidEsales\Eshop\Core\Exception\StandardException $e) {
            $this->checkExceptionType($e);
            return;
        }

        $this->_aViewData["updatelist"] = "1";

        $this->updateShopInformation($config, $shop, $shopId);

        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("actshop", $shopId);
    }
public function save ( ) { parent :: save ( ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ shopId = $ this -> getEditObjectId ( ) ; $ parameters = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; $ user = $ this -> getUser ( ) ; $ shopId = $ this -> updateShopIdByUser ( $ user , $ shopId , false ) ; //  #918 S // checkbox handling $ parameters [ 'oxshops__oxactive' ] = ( isset ( $ parameters [ 'oxshops__oxactive' ] ) && $ parameters [ 'oxshops__oxactive' ] == true ) ? 1 : 0 ; $ parameters [ 'oxshops__oxproductive' ] = ( isset ( $ parameters [ 'oxshops__oxproductive' ] ) && $ parameters [ 'oxshops__oxproductive' ] == true ) ? 1 : 0 ; $ subjLang = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "subjlang" ) ; $ shopLanguageId = ( $ subjLang && $ subjLang > 0 ) ? $ subjLang : 0 ; $ shop = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Shop :: class ) ; if ( $ shopId != self :: NEW_SHOP_ID ) { $ shop -> loadInLang ( $ shopLanguageId , $ shopId ) ; } else { $ parameters = $ this -> updateParameters ( $ parameters ) ; } if ( $ parameters [ 'oxshops__oxsmtp' ] ) { $ parameters [ 'oxshops__oxsmtp' ] = trim ( $ parameters [ 'oxshops__oxsmtp' ] ) ; } $ shop -> setLanguage ( 0 ) ; $ shop -> assign ( $ parameters ) ; $ shop -> setLanguage ( $ shopLanguageId ) ; if ( ( $ newSMPTPass = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "oxsmtppwd" ) ) ) { $ shop -> oxshops__oxsmtppwd -> setValue ( $ newSMPTPass == '-' ? "" : $ newSMPTPass ) ; } $ canCreateShop = $ this -> canCreateShop ( $ shopId , $ shop , $ config ) ; if ( ! $ canCreateShop ) { return ; } try { $ shop -> save ( ) ; } catch ( \ OxidEsales \ Eshop \ Core \ Exception \ StandardException $ e ) { $ this -> checkExceptionType ( $ e ) ; return ; } $ this -> _aViewData [ "updatelist" ] = "1" ; $ this -> updateShopInformation ( $ config , $ shop , $ shopId ) ; \ OxidEsales \ Eshop \ Core \ Registry :: getSession ( ) -> setVariable ( "actshop" , $ shopId ) ; }
Saves changed main shop configuration parameters.

@return null
Saves changed main shop configuration parameters .