Public Member Functions | Protected Member Functions | Protected Attributes

oxRecommList Class Reference

Inheritance diagram for oxRecommList:
Collaboration diagram for oxRecommList:

List of all members.

Public Member Functions

 __construct ()
 getArticles ($iStart=null, $iNrofArticles=null, $blReload=false)
 getArtCount ()
 getFirstArticle ()
 delete ($sOXID=null)
 getArtDescription ($sOXID)
 removeArticle ($sOXID)
 addArticle ($sOXID, $sDesc)
 getRecommListsByIds ($aArticleIds)
 getSearchRecommLists ($sSearchStr)
 getSearchRecommListCount ($sSearchStr)
 addToRatingAverage ($iRating)
 getReviews ()
 getBaseSeoLink ($iLang, $iPage=0)
 getLink ($iLang=null)
 getStdLink ($iLang=null, $aParams=array())
 getBaseStdLink ($iLang, $blAddId=true, $blFull=true)
 setArticlesFilter ($sArticlesFilter)
 save ()

Protected Member Functions

 _getArticleSelect ()
 _loadFirstArticles (oxList $oRecommList, $aIds)
 _getSearchSelect ($sSearchStr)

Protected Attributes

 $_sClassName = 'oxRecommList'
 $_oArticles = null
 $_sArticlesFilter = ''
 $_aSeoUrls = array()

Detailed Description

Recommendation list manager class.

Definition at line 7 of file oxrecommlist.php.


Constructor & Destructor Documentation

oxRecommList.__construct (  ) 

Class constructor, initiates parent constructor (parent.oxBase()).

Returns:
null

Definition at line 42 of file oxrecommlist.php.


Member Function Documentation

oxRecommList._getArticleSelect (  )  [protected]

Returns the appropriate SQL select

Returns:
string

Definition at line 96 of file oxrecommlist.php.

oxRecommList._getSearchSelect ( sSearchStr  )  [protected]

Returns the appropriate SQL select according to search parameters

Parameters:
string $sSearchStr Search string
Returns:
string

Definition at line 353 of file oxrecommlist.php.

oxRecommList._loadFirstArticles ( oxList oRecommList,
aIds 
) [protected]

loads first articles to recomm list also ordering them and clearing not usable list objects ordering priorities: 1. first show articles from our search 2. do not shown articles as 1st, which are shown in other recomm lists as 1st

Parameters:
oxList $oRecommList recommendation list
array $aIds article ids
Returns:
null

Definition at line 265 of file oxrecommlist.php.

oxRecommList.addArticle ( sOXID,
sDesc 
)

Add article to recommendation list

Parameters:
string $sOXID Object ID
string $sDesc recommended article description
Returns:
bool

Definition at line 190 of file oxrecommlist.php.

oxRecommList.addToRatingAverage ( iRating  ) 

Calculates and saves product rating average

Parameters:
integer $iRating new rating value
Returns:
null

Definition at line 373 of file oxrecommlist.php.

oxRecommList.delete ( sOXID = null  ) 

Removes articles from the recommlist and deletes list

Parameters:
string $sOXID Object ID(default null)
Returns:
bool

Definition at line 127 of file oxrecommlist.php.

oxRecommList.getArtCount (  ) 

Returns count of recommendation list items

Returns:
array of oxUserBasketItems

Definition at line 81 of file oxrecommlist.php.

oxRecommList.getArtDescription ( sOXID  ) 

Returns article description for recommendation list

Parameters:
string $sOXID Object ID
Returns:
string

Definition at line 154 of file oxrecommlist.php.

oxRecommList.getArticles ( iStart = null,
iNrofArticles = null,
blReload = false 
)

Returns list of recommendation list items

Parameters:
integer $iStart start for sql limit
integer $iNrofArticles nr of items per page
bool $blReload if TRUE forces to reload list
Returns:
oxList

Definition at line 57 of file oxrecommlist.php.

oxRecommList.getBaseSeoLink ( iLang,
iPage = 0 
)

Returns raw recommlist seo url

Parameters:
int $iLang language id
int $iPage page number [optional]
Returns:
string

Definition at line 406 of file oxrecommlist.php.

oxRecommList.getBaseStdLink ( iLang,
blAddId = true,
blFull = true 
)

Returns base dynamic recommlist url: shopurl/index.php?cl=recommlist

Parameters:
int $iLang language id
bool $blAddId add current object id to url or not
bool $blFull return full including domain name [optional]
Returns:
string

Implements oxIUrl.

Definition at line 465 of file oxrecommlist.php.

oxRecommList.getFirstArticle (  ) 

returns first article from this list's article list

Returns:
oxArticle

Definition at line 111 of file oxrecommlist.php.

oxRecommList.getLink ( iLang = null  ) 

return url to this recomm list page

Parameters:
int $iLang language id [optional]
Returns:
string

Implements oxIUrl.

Definition at line 422 of file oxrecommlist.php.

oxRecommList.getRecommListsByIds ( aArticleIds  ) 

get recommendation lists which include given article ids also sort these lists by these criteria: 1. show lists, that has more requested articles first 2. show lists, that have more any articles

Parameters:
array $aArticleIds Object IDs
Returns:
oxList

Definition at line 214 of file oxrecommlist.php.

oxRecommList.getReviews (  ) 

Collects user written reviews about an article.

Returns:
oxList

Definition at line 387 of file oxrecommlist.php.

oxRecommList.getSearchRecommListCount ( sSearchStr  ) 

Returns the amount of lists according to search parameters.

Parameters:
string $sSearchStr Search string
Returns:
int

Definition at line 333 of file oxrecommlist.php.

oxRecommList.getSearchRecommLists ( sSearchStr  ) 

Returns user recommendation list objects

Parameters:
string $sSearchStr Search string
Returns:
object oxlist with oxrecommlist objects

Definition at line 305 of file oxrecommlist.php.

oxRecommList.getStdLink ( iLang = null,
aParams = array() 
)

Returns standard (dynamic) object URL

Parameters:
int $iLang language id [optional]
array $aParams additional params to use [optional]
Returns:
string

Implements oxIUrl.

Definition at line 447 of file oxrecommlist.php.

oxRecommList.removeArticle ( sOXID  ) 

Remove article from recommendation list

Parameters:
string $sOXID Object ID
Returns:
bool

Definition at line 172 of file oxrecommlist.php.

oxRecommList.save (  ) 

Save this Object to database, insert or update as needed.

Returns:
mixed

Definition at line 493 of file oxrecommlist.php.

oxRecommList.setArticlesFilter ( sArticlesFilter  ) 

set sql filter for article loading

Parameters:
string $sArticlesFilter article filter
Returns:
null

Definition at line 483 of file oxrecommlist.php.


Member Data Documentation

oxRecommList.$_aSeoUrls = array() [protected]

Definition at line 35 of file oxrecommlist.php.

oxRecommList.$_oArticles = null [protected]

Definition at line 21 of file oxrecommlist.php.

oxRecommList.$_sArticlesFilter = '' [protected]

Definition at line 28 of file oxrecommlist.php.

oxRecommList.$_sClassName = 'oxRecommList' [protected]

Definition at line 14 of file oxrecommlist.php.


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