source/Application/Model/ArticleList.php
public function loadOrderArticles($aOrders)
    {
        if (!count($aOrders)) {
            $this->clear();

            return;
        }

        foreach ($aOrders as $iKey => $oOrder) {
            $aOrdersIds[] = $oOrder->getId();
        }

        $oBaseObject = $this->getBaseObject();
        $sArticleTable = $oBaseObject->getViewName();
        $sArticleFields = $oBaseObject->getSelectFields();
        $sArticleFields = str_replace("`$sArticleTable`.`oxid`", "`oxorderarticles`.`oxartid` AS `oxid`", $sArticleFields);

        $sSelect = "SELECT $sArticleFields FROM oxorderarticles ";
        $sSelect .= "left join $sArticleTable on oxorderarticles.oxartid = $sArticleTable.oxid ";
        $sSelect .= "WHERE oxorderarticles.oxorderid IN ( '" . implode("','", $aOrdersIds) . "' ) ";
        $sSelect .= "order by $sArticleTable.oxid ";

        $this->selectString($sSelect);

        // not active or not available products must not have button "tobasket"
        $sNow = date('Y-m-d H:i:s');
        foreach ($this as $oArticle) {
            if (!$oArticle->oxarticles__oxactive->value &&
                ($oArticle->oxarticles__oxactivefrom->value > $sNow ||
                 $oArticle->oxarticles__oxactiveto->value < $sNow
                )
            ) {
                $oArticle->setBuyableState(false);
            }
        }
    }
public function loadOrderArticles($aOrders)
    {
        if (!count($aOrders)) {
            $this->clear();

            return;
        }

        foreach ($aOrders as $iKey => $oOrder) {
            $aOrdersIds[] = $oOrder->getId();
        }

        $oBaseObject = $this->getBaseObject();
        $sArticleTable = $oBaseObject->getViewName();
        $sArticleFields = $oBaseObject->getSelectFields();
        $sArticleFields = str_replace("`$sArticleTable`.`oxid`", "`oxorderarticles`.`oxartid` AS `oxid`", $sArticleFields);

        $sSelect = "SELECT $sArticleFields FROM oxorderarticles ";
        $sSelect .= "left join $sArticleTable on oxorderarticles.oxartid = $sArticleTable.oxid ";
        $sSelect .= "WHERE oxorderarticles.oxorderid IN ( '" . implode("','", $aOrdersIds) . "' ) ";
        $sSelect .= "order by $sArticleTable.oxid ";

        $this->selectString($sSelect);

        // not active or not available products must not have button "tobasket"
        $sNow = date('Y-m-d H:i:s');
        foreach ($this as $oArticle) {
            if (!$oArticle->oxarticles__oxactive->value &&
                ($oArticle->oxarticles__oxactivefrom->value > $sNow ||
                 $oArticle->oxarticles__oxactiveto->value < $sNow
                )
            ) {
                $oArticle->setBuyableState(false);
            }
        }
    }
public function loadOrderArticles ( $ aOrders ) { if ( ! count ( $ aOrders ) ) { $ this -> clear ( ) ; return ; } foreach ( $ aOrders as $ iKey => $ oOrder ) { $ aOrdersIds [ ] = $ oOrder -> getId ( ) ; } $ oBaseObject = $ this -> getBaseObject ( ) ; $ sArticleTable = $ oBaseObject -> getViewName ( ) ; $ sArticleFields = $ oBaseObject -> getSelectFields ( ) ; $ sArticleFields = str_replace ( "`$sArticleTable`.`oxid`" , "`oxorderarticles`.`oxartid` AS `oxid`" , $ sArticleFields ) ; $ sSelect = "SELECT $sArticleFields FROM oxorderarticles " ; $ sSelect .= "left join $sArticleTable on oxorderarticles.oxartid = $sArticleTable.oxid " ; $ sSelect .= "WHERE oxorderarticles.oxorderid IN ( '" . implode ( "','" , $ aOrdersIds ) . "' ) " ; $ sSelect .= "order by $sArticleTable.oxid " ; $ this -> selectString ( $ sSelect ) ; // not active or not available products must not have button "tobasket" $ sNow = date ( 'Y-m-d H:i:s' ) ; foreach ( $ this as $ oArticle ) { if ( ! $ oArticle -> oxarticles__oxactive -> value && ( $ oArticle -> oxarticles__oxactivefrom -> value > $ sNow || $ oArticle -> oxarticles__oxactiveto -> value < $ sNow ) ) { $ oArticle -> setBuyableState ( false ) ; } } }
Loads the article list by orders ids

@param array $aOrders user orders array

@return null;
Loads the article list by orders ids