source/Application/Controller/Admin/ArticleMain.php
protected function _copyStaffelpreis($sOldId, $sNewId)
    {
        $sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        $oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $oPriceList->init("oxbase", "oxprice2article");
        $sQ = "select * from oxprice2article where oxartid = '{$sOldId}' and oxshopid = '{$sShopId}' " .
              "and (oxamount > 0 or oxamountto > 0) order by oxamount ";
        $oPriceList->selectString($sQ);
        if ($oPriceList->count()) {
            foreach ($oPriceList as $oItem) {
                $oItem->oxprice2article__oxid->setValue($oItem->setId());
                $oItem->oxprice2article__oxartid->setValue($sNewId);
                $oItem->save();
            }
        }
    }
protected function _copyStaffelpreis($sOldId, $sNewId)
    {
        $sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        $oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $oPriceList->init("oxbase", "oxprice2article");
        $sQ = "select * from oxprice2article where oxartid = '{$sOldId}' and oxshopid = '{$sShopId}' " .
              "and (oxamount > 0 or oxamountto > 0) order by oxamount ";
        $oPriceList->selectString($sQ);
        if ($oPriceList->count()) {
            foreach ($oPriceList as $oItem) {
                $oItem->oxprice2article__oxid->setValue($oItem->setId());
                $oItem->oxprice2article__oxartid->setValue($sNewId);
                $oItem->save();
            }
        }
    }
protected function _copyStaffelpreis ( $ sOldId , $ sNewId ) { $ sShopId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) ; $ oPriceList = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ oPriceList -> init ( "oxbase" , "oxprice2article" ) ; $ sQ = "select * from oxprice2article where oxartid = '{$sOldId}' and oxshopid = '{$sShopId}' " . "and (oxamount > 0 or oxamountto > 0) order by oxamount " ; $ oPriceList -> selectString ( $ sQ ) ; if ( $ oPriceList -> count ( ) ) { foreach ( $ oPriceList as $ oItem ) { $ oItem -> oxprice2article__oxid -> setValue ( $ oItem -> setId ( ) ) ; $ oItem -> oxprice2article__oxartid -> setValue ( $ sNewId ) ; $ oItem -> save ( ) ; } } }
Copying staffelpreis assignments

@param string $sOldId Id from old article
@param string $sNewId Id from new article
Copying staffelpreis assignments