ext/bestitamazonpay4oxid_module_config.php
public function saveConfVars()
    {
        $sModuleId = $this->getEditObjectId();

        if ($sModuleId === 'bestitamazonpay4oxid') {
            $sQuickConfig = $this->_getContainer()->getConfig()->getRequestParameter('bestitAmazonPay4OxidQuickConfig');

            try {
                $aQuickConfig = json_decode($sQuickConfig, true);

                $aMap = array(
                    'merchant_id' => array('confstrs', 'sAmazonSellerId'),
                    'access_key' => array('confstrs', 'sAmazonAWSAccessKeyId'),
                    'secret_key' => array('confpassword', 'sAmazonSignature'),
                    'client_id' => array('confstrs', 'sAmazonLoginClientId')
                );

                foreach ($aMap as $sAmazonKey => $aConfigKeys) {
                    if (isset($aQuickConfig[$sAmazonKey]) === true) {
                        list($sMainKey, $sSubKey) = $aConfigKeys;
                        $_POST[$sMainKey][$sSubKey] = $aQuickConfig[$sAmazonKey];
                    }
                }
            } catch (\Exception $oException) {
                //Do nothing
            }
        }

        $this->_parentSaveConfVars();
    }
public function saveConfVars()
    {
        $sModuleId = $this->getEditObjectId();

        if ($sModuleId === 'bestitamazonpay4oxid') {
            $sQuickConfig = $this->_getContainer()->getConfig()->getRequestParameter('bestitAmazonPay4OxidQuickConfig');

            try {
                $aQuickConfig = json_decode($sQuickConfig, true);

                $aMap = array(
                    'merchant_id' => array('confstrs', 'sAmazonSellerId'),
                    'access_key' => array('confstrs', 'sAmazonAWSAccessKeyId'),
                    'secret_key' => array('confpassword', 'sAmazonSignature'),
                    'client_id' => array('confstrs', 'sAmazonLoginClientId')
                );

                foreach ($aMap as $sAmazonKey => $aConfigKeys) {
                    if (isset($aQuickConfig[$sAmazonKey]) === true) {
                        list($sMainKey, $sSubKey) = $aConfigKeys;
                        $_POST[$sMainKey][$sSubKey] = $aQuickConfig[$sAmazonKey];
                    }
                }
            } catch (\Exception $oException) {
                //Do nothing
            }
        }

        $this->_parentSaveConfVars();
    }
public function saveConfVars ( ) { $ sModuleId = $ this -> getEditObjectId ( ) ; if ( $ sModuleId === 'bestitamazonpay4oxid' ) { $ sQuickConfig = $ this -> _getContainer ( ) -> getConfig ( ) -> getRequestParameter ( 'bestitAmazonPay4OxidQuickConfig' ) ; try { $ aQuickConfig = json_decode ( $ sQuickConfig , true ) ; $ aMap = array ( 'merchant_id' => array ( 'confstrs' , 'sAmazonSellerId' ) , 'access_key' => array ( 'confstrs' , 'sAmazonAWSAccessKeyId' ) , 'secret_key' => array ( 'confpassword' , 'sAmazonSignature' ) , 'client_id' => array ( 'confstrs' , 'sAmazonLoginClientId' ) ) ; foreach ( $ aMap as $ sAmazonKey => $ aConfigKeys ) { if ( isset ( $ aQuickConfig [ $ sAmazonKey ] ) === true ) { list ( $ sMainKey , $ sSubKey ) = $ aConfigKeys ; $ _POST [ $ sMainKey ] [ $ sSubKey ] = $ aQuickConfig [ $ sAmazonKey ] ; } } } catch ( \ Exception $ oException ) { //Do nothing } } $ this -> _parentSaveConfVars ( ) ; }
Extends the save config variable function to store the amazon config vars
from the provided config json object.
@throws oxSystemComponentException
Extends the save config variable function to store the amazon config vars from the provided config json object .