Public Member Functions | Protected Member Functions | Protected Attributes

oxArticleList Class Reference

Inheritance diagram for oxArticleList:
Collaboration diagram for oxArticleList:

List of all members.

Public Member Functions

 setCustomSorting ($sSorting)
 enableSelectLists ()
 selectString ($sSelect)
 getHistoryArticles ()
 setHistoryArticles ($aArticlesIds)
 loadHistoryArticles ($sArtId)
 loadNewestArticles ($iLimit=null)
 loadTop5Articles ()
 loadAktionArticles ($sActionID)
 loadArticleCrossSell ($sArticleId)
 loadArticleAccessoires ($sArticleId)
 loadCategoryIds ($sCatId, $aSessionFilter)
 loadCategoryArticles ($sCatId, $aSessionFilter, $iLimit=null)
 loadRecommArticles ($sRecommId, $sArticlesFilter=null)
 loadRecommArticleIds ($sRecommId, $sArticlesFilter)
 loadSearchIds ($sSearchStr= '', $sSearchCat= '', $sSearchVendor= '', $sSearchManufacturer= '')
 loadPriceIds ($dPriceFrom, $dPriceTo)
 loadPriceArticles ($dPriceFrom, $dPriceTo, $oCategory=null)
 loadVendorIDs ($sVendorId)
 loadManufacturerIDs ($sManufacturerId)
 loadVendorArticles ($sVendorId, $oVendor=null)
 loadManufacturerArticles ($sManufacturerId, $oManufacturer=null)
 loadTagArticles ($sTag, $iLang)
 getTagArticleIds ($sTag, $iLang)
 loadIds ($aIds)
 loadOrderArticles ($aOrders)
 loadStockRemindProducts ($aBasketContents)

Protected Member Functions

 _sortByIds ($aIds)
 _sortByOrderMapCallback ($key1, $key2)
 _getArticleSelect ($sRecommId, $sArticlesFilter=null)
 _createIdListFromSql ($sSql)
 _getFilterIdsSql ($sCatId, $aFilter)
 _getFilterSql ($sCatId, $aFilter)
 _getCategorySelect ($sFields, $sCatId, $aSessionFilter)
 _getSearchSelect ($sSearchString)
 _getPriceSelect ($dPriceFrom, $dPriceTo)
 _getVendorSelect ($sVendorId)
 _getManufacturerSelect ($sManufacturerId)

Protected Attributes

 $_sCustomSorting
 $_sObjectsInListName = 'oxarticle'
 $_blLoadSelectLists = false
 $_blLoadPrice = true

Detailed Description

Article list manager. Collects list of article according to collection rules (categories, etc.).

Definition at line 7 of file oxarticlelist.php.


Member Function Documentation

oxArticleList._createIdListFromSql ( sSql  )  [protected]

fills the list simply with keys of the oxid and the position as value for the given sql

Parameters:
string $sSql SQL select
Returns:
null

Definition at line 807 of file oxarticlelist.php.

oxArticleList._getArticleSelect ( sRecommId,
sArticlesFilter = null 
) [protected]

Returns the appropriate SQL select

Parameters:
string $sRecommId Recommlist ID
string $sArticlesFilter Additional filter for recommlist's items
Returns:
string

Definition at line 471 of file oxarticlelist.php.

oxArticleList._getCategorySelect ( sFields,
sCatId,
aSessionFilter 
) [protected]

Creates SQL Statement to load Articles, etc.

Parameters:
string $sFields Fields which are loaded e.g. "oxid" or "*" etc.
string $sCatId Category tree ID
array $aSessionFilter Like array ( catid => array( attrid => value,...))
Returns:
string SQL

Definition at line 896 of file oxarticlelist.php.

oxArticleList._getFilterIdsSql ( sCatId,
aFilter 
) [protected]

Returns sql to fetch ids of articles fitting current filter

Parameters:
string $sCatId category id
array $aFilter filters for this category
Returns:
string

Definition at line 827 of file oxarticlelist.php.

oxArticleList._getFilterSql ( sCatId,
aFilter 
) [protected]

Returns filtered articles sql "oxid in (filtered ids)" part

Parameters:
string $sCatId category id
array $aFilter filters for this category
Returns:
string

Definition at line 865 of file oxarticlelist.php.

oxArticleList._getManufacturerSelect ( sManufacturerId  )  [protected]

Builds Manufacturer select SQL statement

Parameters:
string $sManufacturerId Manufacturer ID
Returns:
string

Definition at line 1071 of file oxarticlelist.php.

oxArticleList._getPriceSelect ( dPriceFrom,
dPriceTo 
) [protected]

Builds SQL for selecting articles by price

Parameters:
double $dPriceFrom Starting price
double $dPriceTo Max price
Returns:
string

Definition at line 1009 of file oxarticlelist.php.

oxArticleList._getSearchSelect ( sSearchString  )  [protected]

Forms and returns SQL query string for search in DB.

Parameters:
string $sSearchString searching string
Returns:
string

Definition at line 932 of file oxarticlelist.php.

oxArticleList._getVendorSelect ( sVendorId  )  [protected]

Builds vendor select SQL statement

Parameters:
string $sVendorId Vendor ID
Returns:
string

Definition at line 1048 of file oxarticlelist.php.

oxArticleList._sortByIds ( aIds  )  [protected]

sort this list by given order.

Parameters:
array $aIds ordered ids
Returns:
null

Definition at line 153 of file oxarticlelist.php.

oxArticleList._sortByOrderMapCallback ( key1,
key2 
) [protected]

callback function only used from _sortByIds

Parameters:
string $key1 1st key
string $key2 2nd key
See also:
oxArticleList._sortByIds
Returns:
int

Definition at line 169 of file oxarticlelist.php.

oxArticleList.enableSelectLists (  ) 

Call enableSelectLists() for loading select lists in lst articles

Returns:
null

Definition at line 55 of file oxarticlelist.php.

oxArticleList.getHistoryArticles (  ) 

Get history article id's from session or cookie.

Returns:
array

Definition at line 86 of file oxarticlelist.php.

oxArticleList.getTagArticleIds ( sTag,
iLang 
)

Returns array of article ids belonging to current tags

Parameters:
string $sTag current tag
int $iLang active language
Returns:
array

Definition at line 703 of file oxarticlelist.php.

oxArticleList.loadAktionArticles ( sActionID  ) 

Loads shop AktionArticles.

Parameters:
string $sActionID Action id
Returns:
null

Definition at line 281 of file oxarticlelist.php.

oxArticleList.loadArticleAccessoires ( sArticleId  ) 

Loads article accessoires

Parameters:
string $sArticleId Article id
Returns:
null

Definition at line 352 of file oxarticlelist.php.

oxArticleList.loadArticleCrossSell ( sArticleId  ) 

Loads article crosssellings

Parameters:
string $sArticleId Article id
Returns:
null

Definition at line 316 of file oxarticlelist.php.

oxArticleList.loadCategoryArticles ( sCatId,
aSessionFilter,
iLimit = null 
)

Loads articles for the give Category

Parameters:
string $sCatId Category tree ID
array $aSessionFilter Like array ( catid => array( attrid => value,...))
int $iLimit Limit
Returns:
integer total Count of Articles in this Category

Definition at line 400 of file oxarticlelist.php.

oxArticleList.loadCategoryIds ( sCatId,
aSessionFilter 
)

Loads only ID's and create Fake objects for cmp_categories.

Parameters:
string $sCatId Category tree ID
array $aSessionFilter Like array ( catid => array( attrid => value,...))
Returns:
null

Definition at line 383 of file oxarticlelist.php.

oxArticleList.loadHistoryArticles ( sArtId  ) 

Loads up to 4 history (normally recently seen) articles from session, and adds $sArtId to history. Returns article id array.

Parameters:
string $sArtId Article ID
Returns:
array

Definition at line 121 of file oxarticlelist.php.

oxArticleList.loadIds ( aIds  ) 

Load the list by article ids

Parameters:
array $aIds Article ID array
Returns:
null;

Definition at line 740 of file oxarticlelist.php.

oxArticleList.loadManufacturerArticles ( sManufacturerId,
oManufacturer = null 
)

Loads articles that belongs to Manufacturer, passed by parameter $sManufacturerId. Returns count of selected articles.

Parameters:
string $sManufacturerId Manufacturer ID
object $oManufacturer Active Manufacturer object
Returns:
integer

Definition at line 645 of file oxarticlelist.php.

oxArticleList.loadManufacturerIDs ( sManufacturerId  ) 

Loads Products for specified Manufacturer

Parameters:
string $sManufacturerId Manufacturer id
Returns:
null;

Definition at line 613 of file oxarticlelist.php.

oxArticleList.loadNewestArticles ( iLimit = null  ) 

Loads newest shops articles from DB.

Parameters:
int $iLimit Select limit
Returns:
null;

Definition at line 201 of file oxarticlelist.php.

oxArticleList.loadOrderArticles ( aOrders  ) 

Loads the article list by orders ids

Parameters:
array $aOrders user orders array
Returns:
null;

Definition at line 769 of file oxarticlelist.php.

oxArticleList.loadPriceArticles ( dPriceFrom,
dPriceTo,
oCategory = null 
)

Loads articles, that price is bigger than passed $dPriceFrom and smaller than passed $dPriceTo. Returns count of selected articles.

Parameters:
double $dPriceFrom Price from
double $dPriceTo Price to
object $oCategory Active category object
Returns:
integer

Definition at line 571 of file oxarticlelist.php.

oxArticleList.loadPriceIds ( dPriceFrom,
dPriceTo 
)

Loads Id list of appropriate price products

Parameters:
float $dPriceFrom Starting price
float $dPriceTo Max price
Returns:
null;

Definition at line 555 of file oxarticlelist.php.

oxArticleList.loadRecommArticleIds ( sRecommId,
sArticlesFilter 
)

Loads only ID's and create Fake objects.

Parameters:
string $sRecommId Recommlist ID
string $sArticlesFilter Additional filter for recommlist's items
Returns:
null

Definition at line 452 of file oxarticlelist.php.

oxArticleList.loadRecommArticles ( sRecommId,
sArticlesFilter = null 
)

Loads articles for the recommlist

Parameters:
string $sRecommId Recommlist ID
string $sArticlesFilter Additional filter for recommlist's items
Returns:
integer total Count of Articles in this Category

Definition at line 438 of file oxarticlelist.php.

oxArticleList.loadSearchIds ( sSearchStr = '',
sSearchCat = '',
sSearchVendor = '',
sSearchManufacturer = '' 
)

Loads only ID's and create Fake objects for cmp_categories.

Parameters:
string $sSearchStr Search string
string $sSearchCat Search within category
string $sSearchVendor Search within vendor
string $sSearchManufacturer Search within manufacturer
Returns:
null;

Definition at line 493 of file oxarticlelist.php.

oxArticleList.loadStockRemindProducts ( aBasketContents  ) 

Loads list of low stock state products

Parameters:
array $aBasketContents product ids array
Returns:
null

Definition at line 1094 of file oxarticlelist.php.

oxArticleList.loadTagArticles ( sTag,
iLang 
)

Loads a list of articles having

Parameters:
string $sTag Searched tag
int $iLang Active language
Returns:
int

Definition at line 661 of file oxarticlelist.php.

oxArticleList.loadTop5Articles (  ) 

Load top 5 articles

Returns:
null

Definition at line 244 of file oxarticlelist.php.

oxArticleList.loadVendorArticles ( sVendorId,
oVendor = null 
)

Loads articles that belongs to vendor, passed by parameter $sVendorId. Returns count of selected articles.

Parameters:
string $sVendorId Vendor ID
object $oVendor Active vendor object
Returns:
integer

Definition at line 628 of file oxarticlelist.php.

oxArticleList.loadVendorIDs ( sVendorId  ) 

Loads Products for specified vendor

Parameters:
string $sVendorId Vendor id
Returns:
null;

Definition at line 600 of file oxarticlelist.php.

oxArticleList.selectString ( sSelect  ) 

Loads selectlists for each artile in list if they exists Returns true on success.

Parameters:
string $sSelect SQL select string
Returns:
bool

Reimplemented from oxList.

Definition at line 68 of file oxarticlelist.php.

oxArticleList.setCustomSorting ( sSorting  ) 

Set Custom Sorting, simply an order by....

Parameters:
string $sSorting Custom sorting
Returns:
null

Definition at line 42 of file oxarticlelist.php.

oxArticleList.setHistoryArticles ( aArticlesIds  ) 

Set history article id's to session or cookie

Parameters:
array $aArticlesIds array history article ids
Returns:
null

Definition at line 102 of file oxarticlelist.php.


Member Data Documentation

oxArticleList.$_blLoadPrice = true [protected]

Definition at line 33 of file oxarticlelist.php.

oxArticleList.$_blLoadSelectLists = false [protected]

Definition at line 26 of file oxarticlelist.php.

oxArticleList.$_sCustomSorting [protected]

Definition at line 12 of file oxarticlelist.php.

oxArticleList.$_sObjectsInListName = 'oxarticle' [protected]

Reimplemented from oxList.

Definition at line 19 of file oxarticlelist.php.


The documentation for this class was generated from the following file: