source/Application/Controller/Admin/ArticleStock.php
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $this->_aViewData["edit"] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oArticle->loadInLang($this->_iEditLang, $soxId);

            // load object in other languages
            $oOtherLang = $oArticle->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oArticle->loadInLang(key($oOtherLang), $soxId);
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }

            if ($oArticle->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // variant handling
            if ($oArticle->oxarticles__oxparentid->value) {
                $oParentArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
                $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
                $this->_aViewData["parentarticle"] = $oParentArticle;
                $this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
            }

            if ($myConfig->getConfigParam('blMallInterchangeArticles')) {
                $sShopSelect = '1';
            } else {
                $sShopID = $myConfig->getShopID();
                $sShopSelect = " oxshopid =  '$sShopID' ";
            }

            $oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oPriceList->init('oxbase', "oxprice2article");
            $sQ = "select * from oxprice2article where oxartid = '{$soxId}' " .
                  "and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount ";
            $oPriceList->selectstring($sQ);

            $this->_aViewData["amountprices"] = $oPriceList;
        }

        return "article_stock.tpl";
    }
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $this->_aViewData["edit"] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oArticle->loadInLang($this->_iEditLang, $soxId);

            // load object in other languages
            $oOtherLang = $oArticle->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oArticle->loadInLang(key($oOtherLang), $soxId);
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }

            if ($oArticle->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // variant handling
            if ($oArticle->oxarticles__oxparentid->value) {
                $oParentArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
                $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
                $this->_aViewData["parentarticle"] = $oParentArticle;
                $this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
            }

            if ($myConfig->getConfigParam('blMallInterchangeArticles')) {
                $sShopSelect = '1';
            } else {
                $sShopID = $myConfig->getShopID();
                $sShopSelect = " oxshopid =  '$sShopID' ";
            }

            $oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oPriceList->init('oxbase', "oxprice2article");
            $sQ = "select * from oxprice2article where oxartid = '{$soxId}' " .
                  "and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount ";
            $oPriceList->selectstring($sQ);

            $this->_aViewData["amountprices"] = $oPriceList;
        }

        return "article_stock.tpl";
    }
public function render ( ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; parent :: render ( ) ; $ this -> _aViewData [ "edit" ] = $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ soxId = $ this -> getEditObjectId ( ) ; if ( isset ( $ soxId ) && $ soxId != "-1" ) { // load object $ oArticle -> loadInLang ( $ this -> _iEditLang , $ soxId ) ; // load object in other languages $ oOtherLang = $ oArticle -> getAvailableInLangs ( ) ; if ( ! isset ( $ oOtherLang [ $ this -> _iEditLang ] ) ) { // echo "language entry doesn't exist! using: ".key($oOtherLang); $ oArticle -> loadInLang ( key ( $ oOtherLang ) , $ soxId ) ; } foreach ( $ oOtherLang as $ id => $ language ) { $ oLang = new stdClass ( ) ; $ oLang -> sLangDesc = $ language ; $ oLang -> selected = ( $ id == $ this -> _iEditLang ) ; $ this -> _aViewData [ "otherlang" ] [ $ id ] = clone $ oLang ; } if ( $ oArticle -> isDerived ( ) ) { $ this -> _aViewData [ 'readonly' ] = true ; } // variant handling if ( $ oArticle -> oxarticles__oxparentid -> value ) { $ oParentArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ oParentArticle -> load ( $ oArticle -> oxarticles__oxparentid -> value ) ; $ this -> _aViewData [ "parentarticle" ] = $ oParentArticle ; $ this -> _aViewData [ "oxparentid" ] = $ oArticle -> oxarticles__oxparentid -> value ; } if ( $ myConfig -> getConfigParam ( 'blMallInterchangeArticles' ) ) { $ sShopSelect = '1' ; } else { $ sShopID = $ myConfig -> getShopID ( ) ; $ sShopSelect = " oxshopid =  '$sShopID' " ; } $ oPriceList = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ oPriceList -> init ( 'oxbase' , "oxprice2article" ) ; $ sQ = "select * from oxprice2article where oxartid = '{$soxId}' " . "and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount " ; $ oPriceList -> selectstring ( $ sQ ) ; $ this -> _aViewData [ "amountprices" ] = $ oPriceList ; } return "article_stock.tpl" ; }
Loads article Inventory information, passes it to Smarty engine and
returns name of template file "article_stock.tpl".

@return string
Loads article Inventory information passes it to Smarty engine and returns name of template file article_stock . tpl .