source/Application/Controller/Admin/DeliverySetMainAjax.php
public function addToSet()
    {
        $aChosenSets = $this->_getActionIds('oxdelivery.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sDeliveryViewName = $this->_getViewName('oxdelivery');
            $aChosenSets = $this->_getAll($this->_addFilter("select $sDeliveryViewName.oxid " . $this->_getQuery()));
        }
        if ($soxId && $soxId != "-1" && is_array($aChosenSets)) {
            // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804 and ESDEV-3822).
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
            foreach ($aChosenSets as $sChosenSet) {
                // check if we have this entry already in
                // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
                $sID = $database->getOne("select oxid from oxdel2delset where oxdelid =  " . $database->quote($sChosenSet) . " and oxdelsetid = " . $database->quote($soxId));
                if (!isset($sID) || !$sID) {
                    $oDel2delset = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                    $oDel2delset->init('oxdel2delset');
                    $oDel2delset->oxdel2delset__oxdelid = new \OxidEsales\Eshop\Core\Field($sChosenSet);
                    $oDel2delset->oxdel2delset__oxdelsetid = new \OxidEsales\Eshop\Core\Field($soxId);
                    $oDel2delset->save();
                }
            }
        }
    }
public function addToSet()
    {
        $aChosenSets = $this->_getActionIds('oxdelivery.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sDeliveryViewName = $this->_getViewName('oxdelivery');
            $aChosenSets = $this->_getAll($this->_addFilter("select $sDeliveryViewName.oxid " . $this->_getQuery()));
        }
        if ($soxId && $soxId != "-1" && is_array($aChosenSets)) {
            // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804 and ESDEV-3822).
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
            foreach ($aChosenSets as $sChosenSet) {
                // check if we have this entry already in
                // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
                $sID = $database->getOne("select oxid from oxdel2delset where oxdelid =  " . $database->quote($sChosenSet) . " and oxdelsetid = " . $database->quote($soxId));
                if (!isset($sID) || !$sID) {
                    $oDel2delset = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                    $oDel2delset->init('oxdel2delset');
                    $oDel2delset->oxdel2delset__oxdelid = new \OxidEsales\Eshop\Core\Field($sChosenSet);
                    $oDel2delset->oxdel2delset__oxdelsetid = new \OxidEsales\Eshop\Core\Field($soxId);
                    $oDel2delset->save();
                }
            }
        }
    }
public function addToSet ( ) { $ aChosenSets = $ this -> _getActionIds ( 'oxdelivery.oxid' ) ; $ soxId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'synchoxid' ) ; // adding if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'all' ) ) { $ sDeliveryViewName = $ this -> _getViewName ( 'oxdelivery' ) ; $ aChosenSets = $ this -> _getAll ( $ this -> _addFilter ( "select $sDeliveryViewName.oxid " . $ this -> _getQuery ( ) ) ) ; } if ( $ soxId && $ soxId != "-1" && is_array ( $ aChosenSets ) ) { // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804 and ESDEV-3822). $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getMaster ( ) ; foreach ( $ aChosenSets as $ sChosenSet ) { // check if we have this entry already in // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804). $ sID = $ database -> getOne ( "select oxid from oxdel2delset where oxdelid =  " . $ database -> quote ( $ sChosenSet ) . " and oxdelsetid = " . $ database -> quote ( $ soxId ) ) ; if ( ! isset ( $ sID ) || ! $ sID ) { $ oDel2delset = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ BaseModel :: class ) ; $ oDel2delset -> init ( 'oxdel2delset' ) ; $ oDel2delset -> oxdel2delset__oxdelid = new \ OxidEsales \ Eshop \ Core \ Field ( $ sChosenSet ) ; $ oDel2delset -> oxdel2delset__oxdelsetid = new \ OxidEsales \ Eshop \ Core \ Field ( $ soxId ) ; $ oDel2delset -> save ( ) ; } } } }
Adds this delivery cost to these sets

@throws Exception
Adds this delivery cost to these sets