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

        $sOxId = $this->getEditObjectId();
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $oAttr = oxNew(\OxidEsales\Eshop\Application\Model\Discount::class);
        if ($sOxId != "-1") {
            $oAttr->load($sOxId);
        } else {
            $aParams['oxdiscount__oxid'] = null;
        }
        // checkbox handling
        if (!isset($aParams['oxdiscount__oxactive'])) {
            $aParams['oxdiscount__oxactive'] = 0;
        }

        //disabling derived items
        if ($oAttr->isDerived()) {
            return;
        }

        //$aParams = $oAttr->ConvertNameArray2Idx( $aParams);
        $oAttr->setLanguage(0);
        $oAttr->assign($aParams);
        $oAttr->setLanguage($this->_iEditLang);
        $oAttr = \OxidEsales\Eshop\Core\Registry::getUtilsFile()->processFiles($oAttr);
        $oAttr->save();

        // set oxid if inserted
        $this->setEditObjectId($oAttr->getId());
    }
public function saveinnlang()
    {
        parent::save();

        $sOxId = $this->getEditObjectId();
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $oAttr = oxNew(\OxidEsales\Eshop\Application\Model\Discount::class);
        if ($sOxId != "-1") {
            $oAttr->load($sOxId);
        } else {
            $aParams['oxdiscount__oxid'] = null;
        }
        // checkbox handling
        if (!isset($aParams['oxdiscount__oxactive'])) {
            $aParams['oxdiscount__oxactive'] = 0;
        }

        //disabling derived items
        if ($oAttr->isDerived()) {
            return;
        }

        //$aParams = $oAttr->ConvertNameArray2Idx( $aParams);
        $oAttr->setLanguage(0);
        $oAttr->assign($aParams);
        $oAttr->setLanguage($this->_iEditLang);
        $oAttr = \OxidEsales\Eshop\Core\Registry::getUtilsFile()->processFiles($oAttr);
        $oAttr->save();

        // set oxid if inserted
        $this->setEditObjectId($oAttr->getId());
    }
public function saveinnlang ( ) { parent :: save ( ) ; $ sOxId = $ this -> getEditObjectId ( ) ; $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; $ oAttr = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Discount :: class ) ; if ( $ sOxId != "-1" ) { $ oAttr -> load ( $ sOxId ) ; } else { $ aParams [ 'oxdiscount__oxid' ] = null ; } // checkbox handling if ( ! isset ( $ aParams [ 'oxdiscount__oxactive' ] ) ) { $ aParams [ 'oxdiscount__oxactive' ] = 0 ; } //disabling derived items if ( $ oAttr -> isDerived ( ) ) { return ; } //$aParams = $oAttr->ConvertNameArray2Idx( $aParams); $ oAttr -> setLanguage ( 0 ) ; $ oAttr -> assign ( $ aParams ) ; $ oAttr -> setLanguage ( $ this -> _iEditLang ) ; $ oAttr = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsFile ( ) -> processFiles ( $ oAttr ) ; $ oAttr -> save ( ) ; // set oxid if inserted $ this -> setEditObjectId ( $ oAttr -> getId ( ) ) ; }
Saves changed selected discount parameters in different language.

@return null
Saves changed selected discount parameters in different language .