source/Application/Model/Article.php
protected function _generateSimListSearchStr($sArticleTable, $aList)
    {
        $sFieldList = $this->getSelectFields();
        $aList = array_slice($aList, 0, \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofSimilarArticles'));

        $sSearch = "select $sFieldList from $sArticleTable where " . $this->getSqlActiveSnippet() . "  and $sArticleTable.oxissearch = 1 and $sArticleTable.oxid in ( ";

        $sSearch .= implode(',', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aList)) . ')';

        // #524A -- randomizing articles in attribute list
        $sSearch .= ' order by rand() ';

        return $sSearch;
    }
protected function _generateSimListSearchStr($sArticleTable, $aList)
    {
        $sFieldList = $this->getSelectFields();
        $aList = array_slice($aList, 0, \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofSimilarArticles'));

        $sSearch = "select $sFieldList from $sArticleTable where " . $this->getSqlActiveSnippet() . "  and $sArticleTable.oxissearch = 1 and $sArticleTable.oxid in ( ";

        $sSearch .= implode(',', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aList)) . ')';

        // #524A -- randomizing articles in attribute list
        $sSearch .= ' order by rand() ';

        return $sSearch;
    }
protected function _generateSimListSearchStr ( $ sArticleTable , $ aList ) { $ sFieldList = $ this -> getSelectFields ( ) ; $ aList = array_slice ( $ aList , 0 , \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iNrofSimilarArticles' ) ) ; $ sSearch = "select $sFieldList from $sArticleTable where " . $ this -> getSqlActiveSnippet ( ) . "  and $sArticleTable.oxissearch = 1 and $sArticleTable.oxid in ( " ; $ sSearch .= implode ( ',' , \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quoteArray ( $ aList ) ) . ')' ; // #524A -- randomizing articles in attribute list $ sSearch .= ' order by rand() ' ; return $ sSearch ; }
Generates search string for similar list.

@param string $sArticleTable Article table name
@param array  $aList         A list of original articles

@return string
Generates search string for similar list .