source/Application/Model/Article.php
protected function _getSimList($sAttributeSql, $iCnt)
    {
        // #523A
        $iAttrPercent = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iAttributesPercent') / 100;
        // 70% same attributes
        if (!$iAttrPercent || $iAttrPercent < 0 || $iAttrPercent > 1) {
            $iAttrPercent = 0.70;
        }
        // #1137V iAttributesPercent = 100 doesn't work
        $iHitMin = ceil($iCnt * $iAttrPercent);

        $aExcludeIds = [];
        $aExcludeIds[] = $this->getId();
        if ($this->getParentId()) {
            $aExcludeIds[] = $this->getParentId();
        }

        // we do not use lists here as we don't need this overhead right now
        $sSelect = "select oxobjectid from oxobject2attribute as t1 where
                    ( $sAttributeSql )
                    and t1.oxobjectid NOT IN (" . implode(', ', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aExcludeIds)) . ")
                    group by t1.oxobjectid having count(*) >= $iHitMin LIMIT 0, 20";

        return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol($sSelect);
    }
protected function _getSimList($sAttributeSql, $iCnt)
    {
        // #523A
        $iAttrPercent = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iAttributesPercent') / 100;
        // 70% same attributes
        if (!$iAttrPercent || $iAttrPercent < 0 || $iAttrPercent > 1) {
            $iAttrPercent = 0.70;
        }
        // #1137V iAttributesPercent = 100 doesn't work
        $iHitMin = ceil($iCnt * $iAttrPercent);

        $aExcludeIds = [];
        $aExcludeIds[] = $this->getId();
        if ($this->getParentId()) {
            $aExcludeIds[] = $this->getParentId();
        }

        // we do not use lists here as we don't need this overhead right now
        $sSelect = "select oxobjectid from oxobject2attribute as t1 where
                    ( $sAttributeSql )
                    and t1.oxobjectid NOT IN (" . implode(', ', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aExcludeIds)) . ")
                    group by t1.oxobjectid having count(*) >= $iHitMin LIMIT 0, 20";

        return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol($sSelect);
    }
protected function _getSimList ( $ sAttributeSql , $ iCnt ) { // #523A $ iAttrPercent = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iAttributesPercent' ) / 100 ; // 70% same attributes if ( ! $ iAttrPercent || $ iAttrPercent < 0 || $ iAttrPercent > 1 ) { $ iAttrPercent = 0.70 ; } // #1137V iAttributesPercent = 100 doesn't work $ iHitMin = ceil ( $ iCnt * $ iAttrPercent ) ; $ aExcludeIds = [ ] ; $ aExcludeIds [ ] = $ this -> getId ( ) ; if ( $ this -> getParentId ( ) ) { $ aExcludeIds [ ] = $ this -> getParentId ( ) ; } // we do not use lists here as we don't need this overhead right now $ sSelect = "select oxobjectid from oxobject2attribute as t1 where
                    ( $sAttributeSql )
                    and t1.oxobjectid NOT IN (" . implode ( ', ' , \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quoteArray ( $ aExcludeIds ) ) . ")
                    group by t1.oxobjectid having count(*) >= $iHitMin LIMIT 0, 20" ; return \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> getCol ( $ sSelect ) ; }
Gets similar list.

@param string $sAttributeSql Attribute selection snippet
@param int    $iCnt          Similar list article count

@return array
Gets similar list .