source/Application/Controller/CompareController.php
public function moveLeft() //#777C
    {
        $sArticleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
        if ($sArticleId && ($aItems = $this->getCompareItems())) {
            $sPrevArticleId = null;

            $blFound = false;
            foreach ($aItems as $sOxid => $sVal) {
                if ($sOxid == $sArticleId) {
                    $blFound = true;
                }
                if (!$blFound) {
                    $sPrevArticleId = $sOxid;
                }
            }

            if ($sPrevArticleId) {
                $aNewItems = [];
                foreach ($aItems as $sOxid => $sVal) {
                    if ($sOxid == $sPrevArticleId) {
                        $aNewItems[$sArticleId] = true;
                    } elseif ($sOxid == $sArticleId) {
                        $aNewItems[$sPrevArticleId] = true;
                    } else {
                        $aNewItems[$sOxid] = true;
                    }
                }

                $this->setCompareItems($aNewItems);
            }
        }
    }
public function moveLeft() //#777C
    {
        $sArticleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
        if ($sArticleId && ($aItems = $this->getCompareItems())) {
            $sPrevArticleId = null;

            $blFound = false;
            foreach ($aItems as $sOxid => $sVal) {
                if ($sOxid == $sArticleId) {
                    $blFound = true;
                }
                if (!$blFound) {
                    $sPrevArticleId = $sOxid;
                }
            }

            if ($sPrevArticleId) {
                $aNewItems = [];
                foreach ($aItems as $sOxid => $sVal) {
                    if ($sOxid == $sPrevArticleId) {
                        $aNewItems[$sArticleId] = true;
                    } elseif ($sOxid == $sArticleId) {
                        $aNewItems[$sPrevArticleId] = true;
                    } else {
                        $aNewItems[$sOxid] = true;
                    }
                }

                $this->setCompareItems($aNewItems);
            }
        }
    }
public function moveLeft ( ) //#777C { $ sArticleId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'aid' ) ; if ( $ sArticleId && ( $ aItems = $ this -> getCompareItems ( ) ) ) { $ sPrevArticleId = null ; $ blFound = false ; foreach ( $ aItems as $ sOxid => $ sVal ) { if ( $ sOxid == $ sArticleId ) { $ blFound = true ; } if ( ! $ blFound ) { $ sPrevArticleId = $ sOxid ; } } if ( $ sPrevArticleId ) { $ aNewItems = [ ] ; foreach ( $ aItems as $ sOxid => $ sVal ) { if ( $ sOxid == $ sPrevArticleId ) { $ aNewItems [ $ sArticleId ] = true ; } elseif ( $ sOxid == $ sArticleId ) { $ aNewItems [ $ sPrevArticleId ] = true ; } else { $ aNewItems [ $ sOxid ] = true ; } } $ this -> setCompareItems ( $ aNewItems ) ; } } }
moves current article to the left in compare items array
moves current article to the left in compare items array