source/Application/Controller/Admin/ArticleExtend.php
protected function prepareBundledArticlesDataForView($article)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDB();
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $articleTable = getViewName('oxarticles', $this->_iEditLang);
        $query = "select {$articleTable}.oxtitle, {$articleTable}.oxartnum, {$articleTable}.oxvarselect " .
            "from {$articleTable} where 1 ";
        // #546
        $isVariantSelectionEnabled = $config->getConfigParam('blVariantsSelection');
        $bundleIdField = 'oxarticles__oxbundleid';
        $query .= $isVariantSelectionEnabled ? '' : " and {$articleTable}.oxparentid = '' ";
        $query .= " and {$articleTable}.oxid = " . $database->quote($article->$bundleIdField->value);

        $resultFromDatabase = $database->select($query);
        if ($resultFromDatabase != false && $resultFromDatabase->count() > 0) {
            while (!$resultFromDatabase->EOF) {
                $articleNumber = new \OxidEsales\Eshop\Core\Field($resultFromDatabase->fields[1]);
                $articleTitle = new \OxidEsales\Eshop\Core\Field($resultFromDatabase->fields[0] . " " . $resultFromDatabase->fields[2]);
                $resultFromDatabase->fetchRow();
            }
        }
        $this->_aViewData['bundle_artnum'] = $articleNumber;
        $this->_aViewData['bundle_title'] = $articleTitle;
    }
protected function prepareBundledArticlesDataForView($article)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDB();
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $articleTable = getViewName('oxarticles', $this->_iEditLang);
        $query = "select {$articleTable}.oxtitle, {$articleTable}.oxartnum, {$articleTable}.oxvarselect " .
            "from {$articleTable} where 1 ";
        // #546
        $isVariantSelectionEnabled = $config->getConfigParam('blVariantsSelection');
        $bundleIdField = 'oxarticles__oxbundleid';
        $query .= $isVariantSelectionEnabled ? '' : " and {$articleTable}.oxparentid = '' ";
        $query .= " and {$articleTable}.oxid = " . $database->quote($article->$bundleIdField->value);

        $resultFromDatabase = $database->select($query);
        if ($resultFromDatabase != false && $resultFromDatabase->count() > 0) {
            while (!$resultFromDatabase->EOF) {
                $articleNumber = new \OxidEsales\Eshop\Core\Field($resultFromDatabase->fields[1]);
                $articleTitle = new \OxidEsales\Eshop\Core\Field($resultFromDatabase->fields[0] . " " . $resultFromDatabase->fields[2]);
                $resultFromDatabase->fetchRow();
            }
        }
        $this->_aViewData['bundle_artnum'] = $articleNumber;
        $this->_aViewData['bundle_title'] = $articleTitle;
    }
protected function prepareBundledArticlesDataForView ( $ article ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDB ( ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ articleTable = getViewName ( 'oxarticles' , $ this -> _iEditLang ) ; $ query = "select {$articleTable}.oxtitle, {$articleTable}.oxartnum, {$articleTable}.oxvarselect " . "from {$articleTable} where 1 " ; // #546 $ isVariantSelectionEnabled = $ config -> getConfigParam ( 'blVariantsSelection' ) ; $ bundleIdField = 'oxarticles__oxbundleid' ; $ query .= $ isVariantSelectionEnabled ? '' : " and {$articleTable}.oxparentid = '' " ; $ query .= " and {$articleTable}.oxid = " . $ database -> quote ( $ article -> $ bundleIdField -> value ) ; $ resultFromDatabase = $ database -> select ( $ query ) ; if ( $ resultFromDatabase != false && $ resultFromDatabase -> count ( ) > 0 ) { while ( ! $ resultFromDatabase -> EOF ) { $ articleNumber = new \ OxidEsales \ Eshop \ Core \ Field ( $ resultFromDatabase -> fields [ 1 ] ) ; $ articleTitle = new \ OxidEsales \ Eshop \ Core \ Field ( $ resultFromDatabase -> fields [ 0 ] . " " . $ resultFromDatabase -> fields [ 2 ] ) ; $ resultFromDatabase -> fetchRow ( ) ; } } $ this -> _aViewData [ 'bundle_artnum' ] = $ articleNumber ; $ this -> _aViewData [ 'bundle_title' ] = $ articleTitle ; }
Adds data to _aViewData for later use in templates.

@param \OxidEsales\Eshop\Application\Model\Article $article
Adds data to _aViewData for later use in templates .