src/ShopBundle/objects/db/TShopArticleList.class.php
public static function LoadArticleList($sOrderString = null, $iLimit = -1, $aFilter = array())
    {
        if (is_null($sOrderString)) {
            $sOrderString = '`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC';
        }
        $query = "SELECT `shop_article`.*
                  FROM `shop_article`
                 WHERE `shop_article`.`variant_parent_id` = ''
               ";
        $sActiveArticleSnippid = TdbShopArticleList::GetActiveArticleQueryRestriction();
        if (!empty($sActiveArticleSnippid)) {
            $query .= ' AND ('.$sActiveArticleSnippid.')';
        }
        if (count($aFilter) > 0) {
            $aTmpFilter = array();
            foreach ($aFilter as $sKey => $sField) {
                $aTmpFilter[] = MySqlLegacySupport::getInstance()->real_escape_string($sKey)."='".MySqlLegacySupport::getInstance()->real_escape_string($sField)."'";
            }
            $query .= ' AND ('.implode(' AND ', $aTmpFilter).')';
        }
        if (!empty($sOrderString)) {
            $query .= ' ORDER BY '.$sOrderString;
        }

        if ($iLimit > 0) {
            $query .= ' LIMIT 0,'.$iLimit;
        }

        $oList = &TdbShopArticleList::GetList($query);

        return $oList;
    }
public static function LoadArticleList($sOrderString = null, $iLimit = -1, $aFilter = array())
    {
        if (is_null($sOrderString)) {
            $sOrderString = '`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC';
        }
        $query = "SELECT `shop_article`.*
                  FROM `shop_article`
                 WHERE `shop_article`.`variant_parent_id` = ''
               ";
        $sActiveArticleSnippid = TdbShopArticleList::GetActiveArticleQueryRestriction();
        if (!empty($sActiveArticleSnippid)) {
            $query .= ' AND ('.$sActiveArticleSnippid.')';
        }
        if (count($aFilter) > 0) {
            $aTmpFilter = array();
            foreach ($aFilter as $sKey => $sField) {
                $aTmpFilter[] = MySqlLegacySupport::getInstance()->real_escape_string($sKey)."='".MySqlLegacySupport::getInstance()->real_escape_string($sField)."'";
            }
            $query .= ' AND ('.implode(' AND ', $aTmpFilter).')';
        }
        if (!empty($sOrderString)) {
            $query .= ' ORDER BY '.$sOrderString;
        }

        if ($iLimit > 0) {
            $query .= ' LIMIT 0,'.$iLimit;
        }

        $oList = &TdbShopArticleList::GetList($query);

        return $oList;
    }
public static function LoadArticleList ( $ sOrderString = null , $ iLimit = - 1 , $ aFilter = array ( ) ) { if ( is_null ( $ sOrderString ) ) { $ sOrderString = '`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC' ; } $ query = "SELECT `shop_article`.*
                  FROM `shop_article`
                 WHERE `shop_article`.`variant_parent_id` = ''
               " ; $ sActiveArticleSnippid = TdbShopArticleList :: GetActiveArticleQueryRestriction ( ) ; if ( ! empty ( $ sActiveArticleSnippid ) ) { $ query .= ' AND (' . $ sActiveArticleSnippid . ')' ; } if ( count ( $ aFilter ) > 0 ) { $ aTmpFilter = array ( ) ; foreach ( $ aFilter as $ sKey => $ sField ) { $ aTmpFilter [ ] = MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sKey ) . "='" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sField ) . "'" ; } $ query .= ' AND (' . implode ( ' AND ' , $ aTmpFilter ) . ')' ; } if ( ! empty ( $ sOrderString ) ) { $ query .= ' ORDER BY ' . $ sOrderString ; } if ( $ iLimit > 0 ) { $ query .= ' LIMIT 0,' . $ iLimit ; } $ oList = & TdbShopArticleList :: GetList ( $ query ) ; return $ oList ; }
return active article list.

@param int    $iCategoryId
@param string $sOrderString
@param int    $iLimit
@param array  $aFilter      - any filters you want to add to the list

@return TdbShopArticleList
return active article list .