OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Application\Model\RecommendationList Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Model\RecommendationList:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Model\RecommendationList:

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=[])
 
 getBaseStdLink ($iLang, $blAddId=true, $blFull=true)
 
 setArticlesFilter ($sArticlesFilter)
 
 save ()
 

Protected Member Functions

 _getArticleSelect ()
 
 _loadFirstArticles (\OxidEsales\Eshop\Core\Model\ListModel $oRecommList, $aIds)
 
 _getSearchSelect ($sSearchStr)
 
 onDelete ()
 
 onSave ()
 

Protected Attributes

 $_sClassName = 'oxRecommList'
 
 $_oArticles = null
 
 $_sArticlesFilter = ''
 
 $_aSeoUrls = []
 

Detailed Description

Recommendation list manager class.

Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::__construct ( )

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

Member Function Documentation

◆ _getArticleSelect()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::_getArticleSelect ( )
protected

Returns the appropriate SQL select

Returns
string

◆ _getSearchSelect()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::_getSearchSelect (   $sSearchStr)
protected

Returns the appropriate SQL select according to search parameters

Parameters
string$sSearchStrSearch string
Returns
string

◆ _loadFirstArticles()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::_loadFirstArticles ( \OxidEsales\Eshop\Core\Model\ListModel  $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
\OxidEsales\Eshop\Core\Model\ListModel$oRecommListrecommendation list
array$aIdsarticle ids

◆ addArticle()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::addArticle (   $sOXID,
  $sDesc 
)

Add article to recommendation list

Parameters
string$sOXIDObject ID
string$sDescrecommended article description
Exceptions
Exception
Returns
bool

◆ addToRatingAverage()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::addToRatingAverage (   $iRating)

Calculates and saves product rating average

Parameters
integer$iRatingnew rating value

◆ delete()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::delete (   $sOXID = null)

Removes articles from the recommlist and deletes list

Parameters
string$sOXIDObject ID(default null)
Returns
bool

◆ getArtCount()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getArtCount ( )

Returns count of recommendation list items

Returns
integer

◆ getArtDescription()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getArtDescription (   $sOXID)

Returns article description for recommendation list

Parameters
string$sOXIDObject ID
Returns
string

◆ getArticles()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getArticles (   $iStart = null,
  $iNrofArticles = null,
  $blReload = false 
)

Returns list of recommendation list items

Parameters
integer$iStartstart for sql limit
integer$iNrofArticlesnr of items per page
bool$blReloadif TRUE forces to reload list
Returns
\OxidEsales\Eshop\Core\Model\ListModel

◆ getBaseSeoLink()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getBaseSeoLink (   $iLang,
  $iPage = 0 
)

Returns raw recommlist seo url

Parameters
int$iLanglanguage id
int$iPagepage number [optional]
Returns
string

◆ getBaseStdLink()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getBaseStdLink (   $iLang,
  $blAddId = true,
  $blFull = true 
)

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

Parameters
int$iLanglanguage id
bool$blAddIdadd current object id to url or not
bool$blFullreturn full including domain name [optional]
Returns
string

◆ getFirstArticle()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getFirstArticle ( )

returns first article from this list's article list

Returns
oxArticle

◆ getLink()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getLink (   $iLang = null)

return url to this recomm list page

Parameters
int$iLanglanguage id [optional]
Returns
string

◆ getRecommListsByIds()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::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$aArticleIdsObject IDs
Returns
\OxidEsales\Eshop\Core\Model\ListModel

◆ getReviews()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getReviews ( )

Collects user written reviews about an article.

Returns
\OxidEsales\Eshop\Core\Model\ListModel

◆ getSearchRecommListCount()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getSearchRecommListCount (   $sSearchStr)

Returns the amount of lists according to search parameters.

Parameters
string$sSearchStrSearch string
Returns
int

◆ getSearchRecommLists()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getSearchRecommLists (   $sSearchStr)

Returns user recommendation list objects

Parameters
string$sSearchStrSearch string
Returns
object oxlist with oxrecommlist objects

◆ getStdLink()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::getStdLink (   $iLang = null,
  $aParams = [] 
)

Returns standard (dynamic) object URL

Parameters
int$iLanglanguage id [optional]
array$aParamsadditional params to use [optional]
Returns
string

◆ onDelete()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::onDelete ( )
protected

Method is used for overriding when deleting recommendation list.

◆ onSave()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::onSave ( )
protected

Method is used for overriding when saving.

◆ removeArticle()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::removeArticle (   $sOXID)

Remove article from recommendation list

Parameters
string$sOXIDObject ID
Returns
bool

◆ save()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::save ( )

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

Returns
mixed

◆ setArticlesFilter()

OxidEsales\EshopCommunity\Application\Model\RecommendationList::setArticlesFilter (   $sArticlesFilter)

set sql filter for article loading

Parameters
string$sArticlesFilterarticle filter

Member Data Documentation

◆ $_aSeoUrls

OxidEsales\EshopCommunity\Application\Model\RecommendationList::$_aSeoUrls = []
protected

◆ $_oArticles

OxidEsales\EshopCommunity\Application\Model\RecommendationList::$_oArticles = null
protected

◆ $_sArticlesFilter

OxidEsales\EshopCommunity\Application\Model\RecommendationList::$_sArticlesFilter = ''
protected

◆ $_sClassName

OxidEsales\EshopCommunity\Application\Model\RecommendationList::$_sClassName = 'oxRecommList'
protected

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