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

Public Member Functions

 render ()
 
 getAddUrlParams ()
 
 getAddSeoUrlParams ()
 
 executefilter ()
 
 getActPage ()
 
 getMetaDescription ()
 
 getTemplateName ()
 
 generatePageNavigationUrl ()
 
 getDefaultSorting ()
 
 getTitleSuffix ()
 
 getTitlePageSuffix ()
 
 getAttributes ()
 
 getArticleList ()
 
 getArticleCount ()
 
 getSimilarRecommListIds ()
 
 getCatTreePath ()
 
 getTreePath ()
 
 getBreadCrumb ()
 
 hasVisibleSubCats ()
 
 getSubCatList ()
 
 getPageNavigation ()
 
 getTitle ()
 
 getBargainArticleList ()
 
 getActiveCategory ()
 
 getCanonicalUrl ()
 
 canSelectDisplayType ()
 
 getPageCount ()
 

Protected Member Functions

 generateViewId ()
 
 getCategoryToRender ()
 
 _checkRequestedPage ()
 
 _processListArticles ()
 
 _getProductLinkType ()
 
 _loadArticles ($category)
 
 _getRequestPageNr ()
 
 _getListDisplayType ()
 
 _getSeoObjectId ()
 
 _getCatPathString ()
 
 _prepareMetaDescription ($meta, $length=1024, $descriptionTag=false)
 
 _collectMetaDescription ($meta, $length=1024, $descriptionTag=false)
 
 _prepareMetaKeyword ($keywords, $removeDuplicatedWords=true)
 
 _collectMetaKeyword ($keywords)
 
 _addPageNrParam ($url, $currentPage, $languageId=null)
 
 _isActCategory ()
 
 _getSubject ($languageId)
 

Protected Attributes

 $_iAllArtCnt = 0
 
 $_iCntPages = 0
 
 $_sThisTemplate = 'page/list/list.tpl'
 
 $_sThisMoreTemplate = 'page/list/morecategories.tpl'
 
 $_sCatPathString = null
 
 $_blShowSorting = true
 
 $_aAttributes = null
 
 $_aCatArtList = null
 
 $_blHasVisibleSubCats = null
 
 $_aSubCatList = null
 
 $_oPageNavigation = null
 
 $_blIsCat = null
 
 $_oRecommList = null
 
 $_sCatTitle = null
 
 $_blBargainAction = false
 
 $_aSimilarRecommListIds = null
 

Detailed Description

List of articles for a selected product group. Collects list of articles, according to it generates links for list gallery, meta tags (for search engines). Result - "list.tpl" template. OXID eShop -> (Any selected shop product category).

Member Function Documentation

◆ _addPageNrParam()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_addPageNrParam (   $url,
  $currentPage,
  $languageId = null 
)
protected

Adds page number parameter to current Url and returns formatted url

Parameters
string$urlUrl to append page numbers
int$currentPageCurrent page number
int$languageIdRequested language
Returns
string

◆ _checkRequestedPage()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_checkRequestedPage ( )
protected

Checks if requested page is valid and:

  • redirecting to first page in case requested page does not exist or
  • displays 404 error if category has no products

◆ _collectMetaDescription()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_collectMetaDescription (   $meta,
  $length = 1024,
  $descriptionTag = false 
)
protected

Meta tags - description and keywords - generator for search engines. Uses string passed by parameters, cleans HTML tags, string duplicates, special chars. Also removes strings defined in $config->aSkipTags (Admin area).

Parameters
string$metaCategory path
int$lengthMax length of result, -1 for no truncation
bool$descriptionTagIf true - performs additional duplicate cleaning
Returns
string

◆ _collectMetaKeyword()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_collectMetaKeyword (   $keywords)
protected

Creates a string of keyword filtered by the function prepareMetaDescription and without any duplicates additional the admin defined strings are removed

Parameters
string$keywordscategory path
Returns
string

◆ _getCatPathString()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getCatPathString ( )
protected

Returns string built from category titles

Returns
string

◆ _getListDisplayType()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getListDisplayType ( )
protected

Get list display type

Returns
null|string

◆ _getProductLinkType()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getProductLinkType ( )
protected

Returns product link type:

  • OXARTICLE_LINKTYPE_PRICECATEGORY - when active category is price category
  • OXARTICLE_LINKTYPE_CATEGORY - when active category is regular category
Returns
int

◆ _getRequestPageNr()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getRequestPageNr ( )
protected

Calls parent::getActPage();

Returns
int

◆ _getSeoObjectId()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getSeoObjectId ( )
protected

Returns active product id to load its seo meta info

Returns
string

◆ _getSubject()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_getSubject (   $languageId)
protected

Returns object, associated with current view. (the object that is shown in frontend)

Parameters
int$languageIdLanguage id
Returns
object

◆ _isActCategory()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_isActCategory ( )
protected

Returns true if we have category

Returns
bool

◆ _loadArticles()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_loadArticles (   $category)
protected

Loads and returns article list of active category.

Parameters
\OxidEsales\Eshop\Application\Model\Category$categorycategory object
Returns
oxArticleList

◆ _prepareMetaDescription()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_prepareMetaDescription (   $meta,
  $length = 1024,
  $descriptionTag = false 
)
protected

Returns current view meta description data.

Parameters
string$metaCategory path.
int$lengthMax length of result, -1 for no truncation.
bool$descriptionTagIf true - performs additional duplicate cleaning.
Returns
string

◆ _prepareMetaKeyword()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_prepareMetaKeyword (   $keywords,
  $removeDuplicatedWords = true 
)
protected

Returns current view keywords separated by comma

Parameters
string$keywordsData to use as keywords
bool$removeDuplicatedWordsRemove duplicated words
Returns
string

◆ _processListArticles()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::_processListArticles ( )
protected

Iterates through list articles and performs list view specific tasks:

  • sets type of link which needs to be generated (Manufacturer link)

◆ canSelectDisplayType()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::canSelectDisplayType ( )

Returns config parameters blShowListDisplayType value

Returns
boolean

◆ executefilter()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::executefilter ( )

Stores chosen category filter into session.

Session variables: session_attrfilter

◆ generatePageNavigationUrl()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::generatePageNavigationUrl ( )

Generates Url for page navigation

Returns
string

◆ generateViewId()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::generateViewId ( )
protected

Generates (if not generated yet) and returns view ID (for template engine caching).

Returns
string $this->_sViewId view id

◆ getActiveCategory()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getActiveCategory ( )

Template variable getter. Returns active search

Returns
\OxidEsales\Eshop\Application\Model\Category

◆ getActPage()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getActPage ( )

Get actual page number.

Returns
int

◆ getAddSeoUrlParams()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getAddSeoUrlParams ( )

Returns additional URL parameters which must be added to list products seo urls

Returns
string

◆ getAddUrlParams()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getAddUrlParams ( )

Returns additional URL parameters which must be added to list products dynamic urls

Returns
string

◆ getArticleCount()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getArticleCount ( )

Article count getter

Returns
int

◆ getArticleList()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getArticleList ( )

Template variable getter. Returns category's article list

Returns
oxArticleList|null

◆ getAttributes()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getAttributes ( )

Template variable getter. Returns array of attribute values we do have here in this category

Returns
array

◆ getBargainArticleList()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getBargainArticleList ( )

Template variable getter. Returns bargain article list

Returns
array

◆ getBreadCrumb()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getBreadCrumb ( )

Returns Bread Crumb - you are here page1/page2/page3...

Returns
array

◆ getCanonicalUrl()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getCanonicalUrl ( )

Returns view canonical url

Returns
string

◆ getCategoryToRender()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getCategoryToRender ( )
protected

Returns category, which should be rendered. In case of 'more categories' page is viewed, sets 'more categories' template, sets empty category as active category and returns it.

Returns
\OxidEsales\Eshop\Application\Model\Category

◆ getCatTreePath()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getCatTreePath ( )

Template variable getter. Returns category path

Returns
array

◆ getDefaultSorting()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getDefaultSorting ( )

Returns default category sorting for selected category

Returns
array

◆ getMetaDescription()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getMetaDescription ( )

Template variable getter. Returns meta description

Returns
string

◆ getPageCount()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getPageCount ( )

Get list articles pages count

Returns
int

◆ getPageNavigation()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getPageNavigation ( )

Template variable getter. Returns page navigation

Returns
object

◆ getSimilarRecommListIds()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getSimilarRecommListIds ( )

Return array of id to form recommend list.

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

◆ getSubCatList()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getSubCatList ( )

Template variable getter. Returns list of subcategories.

Returns
array

◆ getTemplateName()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getTemplateName ( )

Assigns Template name ($this->_sThisTemplate) for article list preview. Name of template can be defined in admin or passed by URL ("tpl" variable).

Returns
string

◆ getTitle()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getTitle ( )

Template variable getter. Returns category title.

Returns
string

◆ getTitlePageSuffix()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getTitlePageSuffix ( )

Returns title page suffix used in template

Returns
string

◆ getTitleSuffix()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getTitleSuffix ( )

Returns title suffix used in template

Returns
string

◆ getTreePath()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::getTreePath ( )

Template variable getter. Returns category path array

Returns
array

◆ hasVisibleSubCats()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::hasVisibleSubCats ( )

Template variable getter. Returns true if category has active subcategories.

Returns
bool

◆ render()

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::render ( )

Executes parent::render(), loads active category, prepares article list sorting rules. According to category type loads list of articles - regular (oxArticleList::LoadCategoryArticles()) or price dependent (oxArticleList::LoadPriceArticles()). Generates page navigation data such as previous/next window URL, number of available pages, generates meta tags info (\OxidEsales\Eshop\Application\Controller\FrontendController::_convertForMetaTags()) and returns name of template to render. Also checks if actual pages count does not exceed real articles page count. If yes - calls error_404_handler().

Returns
string $this->_sThisTemplate current template file name

Member Data Documentation

◆ $_aAttributes

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_aAttributes = null
protected

◆ $_aCatArtList

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_aCatArtList = null
protected

◆ $_aSimilarRecommListIds

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_aSimilarRecommListIds = null
protected

◆ $_aSubCatList

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_aSubCatList = null
protected

◆ $_blBargainAction

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_blBargainAction = false
protected

◆ $_blHasVisibleSubCats

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_blHasVisibleSubCats = null
protected

◆ $_blIsCat

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_blIsCat = null
protected

◆ $_blShowSorting

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_blShowSorting = true
protected

◆ $_iAllArtCnt

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_iAllArtCnt = 0
protected

◆ $_iCntPages

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_iCntPages = 0
protected

◆ $_oPageNavigation

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_oPageNavigation = null
protected

◆ $_oRecommList

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_oRecommList = null
protected

◆ $_sCatPathString

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_sCatPathString = null
protected

◆ $_sCatTitle

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_sCatTitle = null
protected

◆ $_sThisMoreTemplate

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_sThisMoreTemplate = 'page/list/morecategories.tpl'
protected

◆ $_sThisTemplate

OxidEsales\EshopCommunity\Application\Controller\ArticleListController::$_sThisTemplate = 'page/list/list.tpl'
protected

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