OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxArticleList Class Reference
+ Inheritance diagram for oxArticleList:
+ Collaboration diagram for oxArticleList:

Public Member Functions

 setCustomSorting ($sSorting)
 enableSelectLists ()
 selectString ($sSelect)
 getHistoryArticles ()
 setHistoryArticles ($aArticlesIds)
 loadHistoryArticles ($sArtId, $iCnt=4)
 sortByIds ($aIds)
 loadNewestArticles ($iLimit=null)
 loadTop5Articles ($iLimit=null)
 loadActionArticles ($sActionID, $iLimit=null)
 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)
 renewPriceUpdateTime ()
 updateUpcomingPrices ($blForceUpdate=false)
- Public Member Functions inherited from oxList
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $oBase)
 offsetUnset ($offset)
 arrayKeys ()
 rewind ()
 current ()
 key ()
 prev ()
 next ()
 valid ()
 count ()
 clear ()
 assign ($aArray)
 reverse ()
 __construct ($sObjectName=null)
 __get ($sName)
 getArray ()
 init ($sObjectName, $sCoreTable=null)
 getBaseObject ()
 setBaseObject ($oObject)
 add ($oObject)
 assignArray ($aData)
 setSqlLimit ($iStart, $iRecords)
 containsFieldValue ($oVal, $sFieldName)
 getList ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _sortByOrderMapCallback ($key1, $key2)
 _getArticleSelect ($sRecommId, $sArticlesFilter=null)
 _createIdListFromSql ($sSql)
 _getFilterIdsSql ($sCatId, $aFilter)
 _getFilterSql ($sCatId, $aFilter)
 _getCategorySelect ($sFields, $sCatId, $aSessionFilter)
 _getCategoryCountSelect ($sCatId, $aSessionFilter)
 _getSearchSelect ($sSearchString)
 _getPriceSelect ($dPriceFrom, $dPriceTo)
 _getVendorSelect ($sVendorId)
 _getManufacturerSelect ($sManufacturerId)
 _canUpdatePrices ()
- Protected Member Functions inherited from oxList
 _assignElement ($oListObject, $aDbFields)
 _getFieldLongName ($sFieldName)

Protected Attributes

 $_sCustomSorting
 $_sObjectsInListName = 'oxarticle'
 $_blLoadSelectLists = false
- Protected Attributes inherited from oxList
 $_aArray = array()
 $_blRemovedActive = false
 $_sObjectsInListName = 'oxBase'
 $_sCoreTable = null
 $_sShopID = null
 $_aSqlLimit = array()

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

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

Definition at line 8 of file oxarticlelist.php.

Member Function Documentation

oxArticleList::_canUpdatePrices ( )
protected

Checks if price update can be executed - current time > next price update time

Returns
bool

Definition at line 1223 of file oxarticlelist.php.

oxArticleList::_createIdListFromSql (   $sSql)
protected

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

Parameters
string$sSqlSQL select

Definition at line 911 of file oxarticlelist.php.

oxArticleList::_getArticleSelect (   $sRecommId,
  $sArticlesFilter = null 
)
protected

Returns the appropriate SQL select

Parameters
string$sRecommIdRecommlist ID
string$sArticlesFilterAdditional filter for recommlist's items
Returns
string

Definition at line 461 of file oxarticlelist.php.

oxArticleList::_getCategoryCountSelect (   $sCatId,
  $aSessionFilter 
)
protected

Creates SQL Statement to load Articles Count, etc.

Parameters
string$sCatIdCategory tree ID
array$aSessionFilterLike array ( catid => array( attrid => value,...))
Returns
string SQL

Definition at line 1043 of file oxarticlelist.php.

oxArticleList::_getCategorySelect (   $sFields,
  $sCatId,
  $aSessionFilter 
)
protected

Creates SQL Statement to load Articles, etc.

Parameters
string$sFieldsFields which are loaded e.g. "oxid" or "*" etc.
string$sCatIdCategory tree ID
array$aSessionFilterLike array ( catid => array( attrid => value,...))
Returns
string SQL

Definition at line 1005 of file oxarticlelist.php.

oxArticleList::_getFilterIdsSql (   $sCatId,
  $aFilter 
)
protected

Returns sql to fetch ids of articles fitting current filter

Parameters
string$sCatIdcategory id
array$aFilterfilters for this category
Returns
string

Definition at line 931 of file oxarticlelist.php.

oxArticleList::_getFilterSql (   $sCatId,
  $aFilter 
)
protected

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

Parameters
string$sCatIdcategory id
array$aFilterfilters for this category
Returns
string

Definition at line 971 of file oxarticlelist.php.

oxArticleList::_getManufacturerSelect (   $sManufacturerId)
protected

Builds Manufacturer select SQL statement

Parameters
string$sManufacturerIdManufacturer ID
Returns
string

Definition at line 1202 of file oxarticlelist.php.

oxArticleList::_getPriceSelect (   $dPriceFrom,
  $dPriceTo 
)
protected

Builds SQL for selecting articles by price

Parameters
double$dPriceFromStarting price
double$dPriceToMax price
Returns
string

Definition at line 1149 of file oxarticlelist.php.

oxArticleList::_getSearchSelect (   $sSearchString)
protected

Forms and returns SQL query string for search in DB.

Parameters
string$sSearchStringsearching string
Returns
string

Definition at line 1074 of file oxarticlelist.php.

oxArticleList::_getVendorSelect (   $sVendorId)
protected

Builds vendor select SQL statement

Parameters
string$sVendorIdVendor ID
Returns
string

Definition at line 1179 of file oxarticlelist.php.

oxArticleList::_sortByOrderMapCallback (   $key1,
  $key2 
)
protected

callback function only used from sortByIds

Parameters
string$key11st key
string$key22nd key
See Also
oxArticleList::sortByIds
Returns
int

Definition at line 147 of file oxarticlelist.php.

oxArticleList::enableSelectLists ( )

Call enableSelectLists() for loading select lists in lst articles

Definition at line 43 of file oxarticlelist.php.

oxArticleList::getHistoryArticles ( )

Get history article id's from session or cookie.

Returns
array

Definition at line 70 of file oxarticlelist.php.

oxArticleList::getTagArticleIds (   $sTag,
  $iLang 
)

Returns array of article ids belonging to current tags

Parameters
string$sTagcurrent tag
int$iLangactive language
Returns
array

Definition at line 678 of file oxarticlelist.php.

oxArticleList::loadActionArticles (   $sActionID,
  $iLimit = null 
)

Loads shop AktionArticles.

Parameters
string$sActionIDAction id
int$iLimitSelect limit
Returns
null

Definition at line 261 of file oxarticlelist.php.

oxArticleList::loadArticleAccessoires (   $sArticleId)

Loads article accessories

Parameters
string$sArticleIdArticle id
Returns
null

Definition at line 351 of file oxarticlelist.php.

oxArticleList::loadArticleCrossSell (   $sArticleId)

Loads article cross selling

Parameters
string$sArticleIdArticle id
Returns
null

Definition at line 299 of file oxarticlelist.php.

oxArticleList::loadCategoryArticles (   $sCatId,
  $aSessionFilter,
  $iLimit = null 
)

Loads articles for the give Category

Parameters
string$sCatIdCategory tree ID
array$aSessionFilterLike array ( catid => array( attrid => value,...))
int$iLimitLimit
Returns
integer total Count of Articles in this Category

Definition at line 397 of file oxarticlelist.php.

oxArticleList::loadCategoryIds (   $sCatId,
  $aSessionFilter 
)

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

Parameters
string$sCatIdCategory tree ID
array$aSessionFilterLike array ( catid => array( attrid => value,...))

Definition at line 380 of file oxarticlelist.php.

oxArticleList::loadHistoryArticles (   $sArtId,
  $iCnt = 4 
)

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

Parameters
string$sArtIdArticle ID
int$iCntproduct count

Definition at line 102 of file oxarticlelist.php.

oxArticleList::loadIds (   $aIds)

Load the list by article ids

Parameters
array$aIdsArticle ID array
Returns
null;

Definition at line 716 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$sManufacturerIdManufacturer ID
object$oManufacturerActive Manufacturer object
Returns
integer

Definition at line 620 of file oxarticlelist.php.

oxArticleList::loadManufacturerIDs (   $sManufacturerId)

Loads Products for specified Manufacturer

Parameters
string$sManufacturerIdManufacturer id

Definition at line 588 of file oxarticlelist.php.

oxArticleList::loadNewestArticles (   $iLimit = null)

Loads newest shops articles from DB.

Parameters
int$iLimitSelect limit

Definition at line 177 of file oxarticlelist.php.

oxArticleList::loadOrderArticles (   $aOrders)

Loads the article list by orders ids

Parameters
array$aOrdersuser orders array
Returns
null;

Definition at line 746 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$dPriceFromPrice from
double$dPriceToPrice to
object$oCategoryActive category object
Returns
integer

Definition at line 557 of file oxarticlelist.php.

oxArticleList::loadPriceIds (   $dPriceFrom,
  $dPriceTo 
)

Loads Id list of appropriate price products

Parameters
float$dPriceFromStarting price
float$dPriceToMax price

Definition at line 541 of file oxarticlelist.php.

oxArticleList::loadRecommArticleIds (   $sRecommId,
  $sArticlesFilter 
)

Loads only ID's and create Fake objects.

Parameters
string$sRecommIdRecommlist ID
string$sArticlesFilterAdditional filter for recommlist's items

Definition at line 442 of file oxarticlelist.php.

oxArticleList::loadRecommArticles (   $sRecommId,
  $sArticlesFilter = null 
)

Loads articles for the recommlist

Parameters
string$sRecommIdRecommlist ID
string$sArticlesFilterAdditional filter for recommlist's items

Definition at line 430 of file oxarticlelist.php.

oxArticleList::loadSearchIds (   $sSearchStr = '',
  $sSearchCat = '',
  $sSearchVendor = '',
  $sSearchManufacturer = '' 
)

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

Parameters
string$sSearchStrSearch string
string$sSearchCatSearch within category
string$sSearchVendorSearch within vendor
string$sSearchManufacturerSearch within manufacturer

Definition at line 481 of file oxarticlelist.php.

oxArticleList::loadStockRemindProducts (   $aBasketContents)

Loads list of low stock state products

Parameters
array$aBasketContentsproduct ids array

Definition at line 788 of file oxarticlelist.php.

oxArticleList::loadTagArticles (   $sTag,
  $iLang 
)

Loads a list of articles having

Parameters
string$sTagSearched tag
int$iLangActive language
Returns
int

Definition at line 636 of file oxarticlelist.php.

oxArticleList::loadTop5Articles (   $iLimit = null)

Load top 5 articles

Parameters
int$iLimitSelect limit

Definition at line 220 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$sVendorIdVendor ID
object$oVendorActive vendor object
Returns
integer

Definition at line 603 of file oxarticlelist.php.

oxArticleList::loadVendorIDs (   $sVendorId)

Loads Products for specified vendor

Parameters
string$sVendorIdVendor id

Definition at line 577 of file oxarticlelist.php.

oxArticleList::renewPriceUpdateTime ( )

Calculates, updates and returns next price renew time

Returns
int

Definition at line 820 of file oxarticlelist.php.

oxArticleList::selectString (   $sSelect)

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

Parameters
string$sSelectSQL select string
Returns
bool

Reimplemented from oxList.

Definition at line 56 of file oxarticlelist.php.

oxArticleList::setCustomSorting (   $sSorting)

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

Parameters
string$sSortingCustom sorting

Definition at line 35 of file oxarticlelist.php.

oxArticleList::setHistoryArticles (   $aArticlesIds)

Set history article id's to session or cookie

Parameters
array$aArticlesIdsarray history article ids

Definition at line 84 of file oxarticlelist.php.

oxArticleList::sortByIds (   $aIds)

sort this list by given order.

Parameters
array$aIdsordered ids

Definition at line 131 of file oxarticlelist.php.

oxArticleList::updateUpcomingPrices (   $blForceUpdate = false)

Updates prices where new price > 0, update time != '0000-00-00 00:00:00' and <= CURRENT_TIMESTAMP. Returns update execution state (result of oxDb::execute())

Parameters
bool$blForceUpdateif true, forces price update without timeout check, default value is FALSE
Returns
mixed

Definition at line 851 of file oxarticlelist.php.

Member Data Documentation

oxArticleList::$_blLoadSelectLists = false
protected

Definition at line 28 of file oxarticlelist.php.

oxArticleList::$_sCustomSorting
protected

Definition at line 14 of file oxarticlelist.php.

oxArticleList::$_sObjectsInListName = 'oxarticle'
protected

Definition at line 21 of file oxarticlelist.php.


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