source/Application/Controller/Admin/CategoryMain.php
protected function _parseRequestParametersForSave($aReqParams)
    {
        // checkbox handling
        if (!isset($aReqParams['oxcategories__oxactive'])) {
            $aReqParams['oxcategories__oxactive'] = 0;
        }
        if (!isset($aReqParams['oxcategories__oxhidden'])) {
            $aReqParams['oxcategories__oxhidden'] = 0;
        }
        if (!isset($aReqParams['oxcategories__oxdefsortmode'])) {
            $aReqParams['oxcategories__oxdefsortmode'] = 0;
        }

        // null values
        if ($aReqParams['oxcategories__oxvat'] === '') {
            $aReqParams['oxcategories__oxvat'] = null;
        }

        if ($this->getEditObjectId() == self::NEW_CATEGORY_ID) {
            //#550A - if new category is made then is must be default activ
            //#4051: Impossible to create inactive category
            //$aReqParams['oxcategories__oxactive'] = 1;
            $aReqParams['oxcategories__oxid'] = null;
        }

        if (isset($aReqParams["oxcategories__oxlongdesc"])) {
            $aReqParams["oxcategories__oxlongdesc"] = $this->_processLongDesc($aReqParams["oxcategories__oxlongdesc"]);
        }

        if (empty($aReqParams['oxcategories__oxpricefrom'])) {
            $aReqParams['oxcategories__oxpricefrom'] = 0;
        }
        if (empty($aReqParams['oxcategories__oxpriceto'])) {
            $aReqParams['oxcategories__oxpriceto'] = 0;
        }

        return $aReqParams;
    }
protected function _parseRequestParametersForSave($aReqParams)
    {
        // checkbox handling
        if (!isset($aReqParams['oxcategories__oxactive'])) {
            $aReqParams['oxcategories__oxactive'] = 0;
        }
        if (!isset($aReqParams['oxcategories__oxhidden'])) {
            $aReqParams['oxcategories__oxhidden'] = 0;
        }
        if (!isset($aReqParams['oxcategories__oxdefsortmode'])) {
            $aReqParams['oxcategories__oxdefsortmode'] = 0;
        }

        // null values
        if ($aReqParams['oxcategories__oxvat'] === '') {
            $aReqParams['oxcategories__oxvat'] = null;
        }

        if ($this->getEditObjectId() == self::NEW_CATEGORY_ID) {
            //#550A - if new category is made then is must be default activ
            //#4051: Impossible to create inactive category
            //$aReqParams['oxcategories__oxactive'] = 1;
            $aReqParams['oxcategories__oxid'] = null;
        }

        if (isset($aReqParams["oxcategories__oxlongdesc"])) {
            $aReqParams["oxcategories__oxlongdesc"] = $this->_processLongDesc($aReqParams["oxcategories__oxlongdesc"]);
        }

        if (empty($aReqParams['oxcategories__oxpricefrom'])) {
            $aReqParams['oxcategories__oxpricefrom'] = 0;
        }
        if (empty($aReqParams['oxcategories__oxpriceto'])) {
            $aReqParams['oxcategories__oxpriceto'] = 0;
        }

        return $aReqParams;
    }
protected function _parseRequestParametersForSave ( $ aReqParams ) { // checkbox handling if ( ! isset ( $ aReqParams [ 'oxcategories__oxactive' ] ) ) { $ aReqParams [ 'oxcategories__oxactive' ] = 0 ; } if ( ! isset ( $ aReqParams [ 'oxcategories__oxhidden' ] ) ) { $ aReqParams [ 'oxcategories__oxhidden' ] = 0 ; } if ( ! isset ( $ aReqParams [ 'oxcategories__oxdefsortmode' ] ) ) { $ aReqParams [ 'oxcategories__oxdefsortmode' ] = 0 ; } // null values if ( $ aReqParams [ 'oxcategories__oxvat' ] === '' ) { $ aReqParams [ 'oxcategories__oxvat' ] = null ; } if ( $ this -> getEditObjectId ( ) == self :: NEW_CATEGORY_ID ) { //#550A - if new category is made then is must be default activ //#4051: Impossible to create inactive category //$aReqParams['oxcategories__oxactive'] = 1; $ aReqParams [ 'oxcategories__oxid' ] = null ; } if ( isset ( $ aReqParams [ "oxcategories__oxlongdesc" ] ) ) { $ aReqParams [ "oxcategories__oxlongdesc" ] = $ this -> _processLongDesc ( $ aReqParams [ "oxcategories__oxlongdesc" ] ) ; } if ( empty ( $ aReqParams [ 'oxcategories__oxpricefrom' ] ) ) { $ aReqParams [ 'oxcategories__oxpricefrom' ] = 0 ; } if ( empty ( $ aReqParams [ 'oxcategories__oxpriceto' ] ) ) { $ aReqParams [ 'oxcategories__oxpriceto' ] = 0 ; } return $ aReqParams ; }
Parse parameters prior to saving category.

@param array $aReqParams Request parameters.

@return array
Parse parameters prior to saving category .