source/Application/Controller/Admin/DeliveryArticlesAjax.php
public function addArtToDel()
    {
        $aChosenArt = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aChosenArt = $this->_getAll($this->_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aChosenArt)) {
            foreach ($aChosenArt as $sChosenArt) {
                $oObject2Delivery = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                $oObject2Delivery->init('oxobject2delivery');
                $oObject2Delivery->oxobject2delivery__oxdeliveryid = new \OxidEsales\Eshop\Core\Field($soxId);
                $oObject2Delivery->oxobject2delivery__oxobjectid = new \OxidEsales\Eshop\Core\Field($sChosenArt);
                $oObject2Delivery->oxobject2delivery__oxtype = new \OxidEsales\Eshop\Core\Field("oxarticles");
                $oObject2Delivery->save();
            }
        }
    }
public function addArtToDel()
    {
        $aChosenArt = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aChosenArt = $this->_getAll($this->_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aChosenArt)) {
            foreach ($aChosenArt as $sChosenArt) {
                $oObject2Delivery = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                $oObject2Delivery->init('oxobject2delivery');
                $oObject2Delivery->oxobject2delivery__oxdeliveryid = new \OxidEsales\Eshop\Core\Field($soxId);
                $oObject2Delivery->oxobject2delivery__oxobjectid = new \OxidEsales\Eshop\Core\Field($sChosenArt);
                $oObject2Delivery->oxobject2delivery__oxtype = new \OxidEsales\Eshop\Core\Field("oxarticles");
                $oObject2Delivery->save();
            }
        }
    }
public function addArtToDel ( ) { $ aChosenArt = $ this -> _getActionIds ( 'oxarticles.oxid' ) ; $ soxId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'synchoxid' ) ; // adding if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'all' ) ) { $ sArtTable = $ this -> _getViewName ( 'oxarticles' ) ; $ aChosenArt = $ this -> _getAll ( $ this -> _addFilter ( "select $sArtTable.oxid " . $ this -> _getQuery ( ) ) ) ; } if ( $ soxId && $ soxId != "-1" && is_array ( $ aChosenArt ) ) { foreach ( $ aChosenArt as $ sChosenArt ) { $ oObject2Delivery = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ BaseModel :: class ) ; $ oObject2Delivery -> init ( 'oxobject2delivery' ) ; $ oObject2Delivery -> oxobject2delivery__oxdeliveryid = new \ OxidEsales \ Eshop \ Core \ Field ( $ soxId ) ; $ oObject2Delivery -> oxobject2delivery__oxobjectid = new \ OxidEsales \ Eshop \ Core \ Field ( $ sChosenArt ) ; $ oObject2Delivery -> oxobject2delivery__oxtype = new \ OxidEsales \ Eshop \ Core \ Field ( "oxarticles" ) ; $ oObject2Delivery -> save ( ) ; } } }
Adds article to delivery configuration
Adds article to delivery configuration