110             $sPrevArticleId = null;
 
  113             foreach ($aItems as $sOxid => $sVal) {
 
  114                 if ($sOxid == $sArticleId) {
 
  118                     $sPrevArticleId = $sOxid;
 
  122             if ($sPrevArticleId) {
 
  124                 $aNewItems = array();
 
  125                 foreach ($aItems as $sOxid => $sVal) {
 
  126                     if ($sOxid == $sPrevArticleId) {
 
  127                         $aNewItems[$sArticleId] = 
true;
 
  128                     } elseif ($sOxid == $sArticleId) {
 
  129                         $aNewItems[$sPrevArticleId] = 
true;
 
  131                         $aNewItems[$sOxid] = 
true;
 
  150             foreach ($aItems as $sOxid => $sVal) {
 
  152                     $sNextArticleId = $sOxid;
 
  155                 if ($sOxid == $sArticleId) {
 
  160             if ($sNextArticleId) {
 
  162                 $aNewItems = array();
 
  163                 foreach ($aItems as $sOxid => $sVal) {
 
  164                     if ($sOxid == $sArticleId) {
 
  165                         $aNewItems[$sNextArticleId] = 
true;
 
  166                     } elseif ($sOxid == $sNextArticleId) {
 
  167                         $aNewItems[$sArticleId] = 
true;
 
  169                         $aNewItems[$sOxid] = 
true;
 
  182         $this->_sThisTemplate = 
'compare_popup.tpl';
 
  183         $this->_iArticlesPerPage = -1;
 
  193         $this->_iCompItemsCnt = $iCount;
 
  203         if ($this->_iCompItemsCnt === null) {
 
  204             $this->_iCompItemsCnt = 0;
 
  206                 $this->_iCompItemsCnt = count($aItems);
 
  220         if ($this->_aCompItems === null) {
 
  222             if (is_array($aItems) && count($aItems)) {
 
  223                 $this->_aCompItems = $aItems;
 
  237         $this->_aCompItems = $aItems;
 
  248         $this->_iArticlesPerPage = $iNumber;
 
  268         if ($this->_oArtList === null) {
 
  271                 $oList = 
oxNew(
'oxarticlelist');
 
  272                 $oList->loadIds(array_keys($aItems));
 
  275                 if ($this->_iArticlesPerPage > 0) {
 
  276                     $this->_iCntPages = round($oList->count() / $this->_iArticlesPerPage + 0.49);
 
  294         if ($this->_oAttributeList === null) {
 
  295             $this->_oAttributeList = 
false;
 
  297                 $oAttributeList = 
oxNew(
'oxattributelist');
 
  298                 $this->_oAttributeList = $oAttributeList->loadAttributesByIds(array_keys($oArtList));
 
  312         if ($this->_aSimilarRecommListIds === null) {
 
  313             $this->_aSimilarRecommListIds = 
false;
 
  316                 $this->_aSimilarRecommListIds = array_keys($oArtList);
 
  330         if ($this->_oPageNavigation === null) {
 
  331             $this->_oPageNavigation = 
false;
 
  350         $aListKeys = $oList->arrayKeys();
 
  351         $aItemKeys = array_keys($aItems);
 
  352         $aKeys = array_intersect($aItemKeys, $aListKeys);
 
  353         $aNewItems = array();
 
  355         for ($i = $this->_iArticlesPerPage * $iActPage; $i < $this->_iArticlesPerPage * $iActPage + 
$this->_iArticlesPerPage; $i++) {
 
  356             if (!isset($aKeys[$i])) {
 
  359             $aNewItems[$aKeys[$i]] = & $aItems[$aKeys[$i]];
 
  379         foreach ($aItems as $sOxid => $sVal) {
 
  382             if (!isset ($oList[$sOxid])) {
 
  387             $oNewList[$sOxid] = $oList[$sOxid];
 
  390             $oNewList[$sOxid]->hidePrev = 
false;
 
  391             if ($iActPage == 0 && $iCnt == 1) {
 
  392                 $oNewList[$sOxid]->hidePrev = 
true;
 
  396             $oNewList[$sOxid]->hideNext = 
false;
 
  397             if (($iActPage + 1) == $this->_iCntPages && $iCnt == count($aItems)) {
 
  398                 $oNewList[$sOxid]->hideNext = 
true;
 
  412         if ($this->_iOrderCnt === null) {
 
  413             $this->_iOrderCnt = 0;
 
  414             if ($oUser = $this->
getUser()) {
 
  415                 $this->_iOrderCnt = $oUser->getOrderCount();
 
  437         $aPath[
'link'] = $this->
getLink();