146         if (!isset($this->_sViewId)) {
 
  154             $this->_sViewId = md5(
 
  155                 $sParentViewId . 
'|' . $sCatId . 
'|' . $iActPage . 
'|' . $iArtPerPage . 
'|' . $sListDisplayType
 
  181         $this->_blIsCat = 
false;
 
  184         if (
'oxmore' == 
$myConfig->getRequestParameter(
'cnid')) {
 
  187             $oCategory = 
oxNew(
'oxcategory');
 
  191             $this->_blShowTagCloud = 
true;
 
  194             $blContinue = ( bool ) $oCategory->oxcategories__oxactive->value;
 
  195             $this->_blIsCat = 
true;
 
  196             $this->_blBargainAction = 
true;
 
  201         if (!$blContinue || !$oCategory) {
 
  206         if ($oCat && 
$myConfig->getConfigParam(
'bl_rssCategories')) {
 
  207             $oRss = 
oxNew(
'oxrssfeed');
 
  209                 $oRss->getCategoryArticlesTitle($oCat),
 
  210                 $oRss->getCategoryArticlesUrl($oCat),
 
  218         if ($this->_blIsCat) {
 
  240         if ($iPageCnt && (($iPageCnt - 1) < $this->
getActPage())) {
 
  256             foreach ($aArtList as $oArticle) {
 
  257                 $oArticle->setLinkType($iLinkType);
 
  260                 if ($sAddDynParams) {
 
  261                     $oArticle->appendStdLink($sAddDynParams);
 
  265                 if ($sAddSeoParams) {
 
  266                     $oArticle->appendLink($sAddSeoParams);
 
  284                 $sParams .= ($sParams ? 
'&' : 
'') . 
"pgNr={$iPgNr}";
 
  328         if (!empty($aFilter)) {
 
  332             $aSessionFilter[$sActCat] = null;
 
  333             $aSessionFilter[$sActCat][$iLang] = $aFilter;
 
  349         $iNrofCatArticles = (int) 
$myConfig->getConfigParam(
'iNrofCatArticles');
 
  350         $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;
 
  353         $oArtList = 
oxNew(
'oxarticlelist');
 
  354         $oArtList->setSqlLimit($iNrofCatArticles * $this->
_getRequestPageNr(), $iNrofCatArticles);
 
  357         if ($oCategory->isPriceCategory()) {
 
  358             $dPriceFrom = $oCategory->oxcategories__oxpricefrom->value;
 
  359             $dPriceTo = $oCategory->oxcategories__oxpriceto->value;
 
  361             $this->_iAllArtCnt = $oArtList->loadPriceArticles($dPriceFrom, $dPriceTo, $oCategory);
 
  366             $this->_iAllArtCnt = $oArtList->loadCategoryArticles($sActCat, $aSessionFilter);
 
  369         $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
 
  406         if (is_null($sListDisplayType)) {
 
  410         return $sListDisplayType;
 
  421             return $oCategory->getId();
 
  432         if ($this->_sCatPathString === null) {
 
  435             $this->_sCatPathString = 
false;
 
  441                 $this->_sCatPathString = 
'';
 
  442                 foreach ($aPath as $oCat) {
 
  443                     if ($this->_sCatPathString) {
 
  444                         $this->_sCatPathString .= 
', ';
 
  446                     $this->_sCatPathString .= $oStr->strtolower($oCat->oxcategories__oxtitle->value);
 
  468             if (($oParent = $oCategory->getParentCategory())) {
 
  469                 $sDescription .= 
" {$oParent->oxcategories__oxtitle->value} -";
 
  473             $sDescription .= 
" {$oCategory->oxcategories__oxtitle->value}.";
 
  478         if (($sSuffix = $this->
getConfig()->getActiveShop()->oxshops__oxtitleprefix->value)) {
 
  479             $sDescription .= 
" {$sSuffix}";
 
  483         $sDescription = 
getStr()->html_entity_decode($sDescription);
 
  484         $sDescription = 
getStr()->strip_tags($sDescription);
 
  485         $sDescription = 
getStr()->cleanStr($sDescription);
 
  486         $sDescription = 
getStr()->htmlspecialchars($sDescription);
 
  488         return trim($sDescription);
 
  504             $sMeta .= $sTitlePageSuffix;
 
  527         $sAddText = (($oCategory instanceof 
oxCategory)) ? trim($oCategory->getLongDesc()) : 
'';
 
  530         if (!$sAddText && count($aArticleList)) {
 
  531             foreach ($aArticleList as $oArticle) {
 
  535                 $sAddText .= $oArticle->oxarticles__oxtitle->value;
 
  544             $sMeta = 
"{$sMeta} - {$sAddText}";
 
  564             $aKeywords = array();
 
  567                 foreach ($oCatTree->getPath() as $oCat) {
 
  568                     $aKeywords[] = trim($oCat->oxcategories__oxtitle->value);
 
  572             if (count($aKeywords) > 0) {
 
  573                 $sKeywords = implode(
", ", $aKeywords);
 
  576             $aSubCats = $oCategory->getSubCats();
 
  577             if (is_array($aSubCats)) {
 
  578                 foreach ($aSubCats as $oSubCat) {
 
  579                     $sKeywords .= 
', ' . $oSubCat->oxcategories__oxtitle->value;
 
  586         return trim($sKeywords);
 
  599         $iMaxTextLength = 60;
 
  604             foreach ($aArticleList as $oProduct) {
 
  605                 $sDesc = $oStr->strip_tags(trim($oStr->strtolower($oProduct->getLongDescription()->value)));
 
  608                 $sDesc = $oStr->preg_replace(
"/\./", 
" ", $sDesc);
 
  610                 if ($oStr->strlen($sDesc) > $iMaxTextLength) {
 
  611                     $sMidText = $oStr->substr($sDesc, 0, $iMaxTextLength);
 
  612                     $sDesc = $oStr->substr(
 
  615                         ($oStr->strlen($sMidText) - $oStr->strpos(strrev($sMidText), 
' '))
 
  630             $sText = 
"{$sKeywords}, {$sText}";
 
  647             $this->_sThisTemplate = 
'custom/' . $sTplName;
 
  648         } elseif (($oCategory = $this->
getActiveCategory()) && $oCategory->oxcategories__oxtemplate->value) {
 
  649             $this->_sThisTemplate = $oCategory->oxcategories__oxtemplate->value;
 
  669                 $sUrl = $oCategory->getBaseSeoLink($iLang, $iPage);
 
  696             return $oCategory->getLink();
 
  712         if ($oCategory && $oCategory instanceof 
oxCategory) {
 
  713             if ($sDefaultSorting = $oCategory->getDefaultSorting()) {
 
  714                 $sArticleTable = getViewName(
'oxarticles');
 
  715                 $sSortBy = $sArticleTable . 
'.' . $sDefaultSorting;
 
  716                 $sSortDir = ($oCategory->getDefaultSortingMode()) ? 
"desc" : 
"asc";
 
  717                 $aSorting = array(
'sortby' => $sSortBy, 
'sortdir' => $sSortDir);
 
  733             return $this->
getConfig()->getActiveShop()->oxshops__oxtitlesuffix->value;
 
  770         $this->_aAttributes = 
false;
 
  773             $aAttributes = $oCategory->getAttributes();
 
  774             if (count($aAttributes)) {
 
  775                 $this->_aAttributes = $aAttributes;
 
  789         if ($this->_aArticleList === null) {
 
  792                 if (count($aArticleList)) {
 
  793                     $this->_aArticleList = $aArticleList;
 
  820         if ($this->_aSimilarRecommListIds === null) {
 
  821             $this->_aSimilarRecommListIds = 
false;
 
  824                 $this->_aSimilarRecommListIds = $aCatArtList->arrayKeys();
 
  838         if ($this->_sCatTreePath === null) {
 
  839             $this->_sCatTreePath = 
false;
 
  842                 $this->_sCatTreePath = $oCatTree->getPath();
 
  857             return $oCatTree->getPath();
 
  877             $aPath[
'link'] = $this->
getLink();
 
  884         if (($oCatTree = $this->
getCategoryTree()) && ($oCatPath = $oCatTree->getPath())) {
 
  885             foreach ($oCatPath as $oCat) {
 
  888                 $aCatPath[
'link'] = $oCat->getLink();
 
  889                 $aCatPath[
'title'] = $oCat->oxcategories__oxtitle->value;
 
  891                 $aPaths[] = $aCatPath;
 
  906         if ($this->_blHasVisibleSubCats === null) {
 
  907             $this->_blHasVisibleSubCats = 
false;
 
  909                 $this->_blHasVisibleSubCats = $oClickCat->getHasVisibleSubCats();
 
  923         if ($this->_aSubCatList === null) {
 
  924             $this->_aSubCatList = array();
 
  926                 $this->_aSubCatList = $oClickCat->getSubCats();
 
  940         if ($this->_oPageNavigation === null) {
 
  954         if ($this->_sCatTitle === null) {
 
  955             $this->_sCatTitle = 
false;
 
  958                 $iBaseLanguage = $oLang->getBaseLanguage();
 
  960                 $this->_sCatTitle = $oLang->translateString(
'CATEGORY_OVERVIEW', $iBaseLanguage, 
false);
 
  962                 $sTitleField = 
'oxcategories__oxtitle';
 
  963                 $this->_sCatTitle = $oCategory->$sTitleField->value;
 
  977         if ($this->_aBargainArticleList === null) {
 
  978             $this->_aBargainArticleList = array();
 
  980                 $oArtList = 
oxNew(
'oxarticlelist');
 
  981                 $oArtList->loadActionArticles(
'OXBARGAIN');
 
  982                 if ($oArtList->count()) {
 
  983                     $this->_aBargainArticleList = $oArtList;
 
  998         if ($this->_oActCategory === null) {
 
  999             $this->_oActCategory = 
false;
 
 1000             $oCategory = 
oxNew(
'oxCategory');
 
 1001             if ($oCategory->load($this->getCategoryId())) {
 
 1002                 $this->_oActCategory = $oCategory;
 
 1019                 $sUrl = $oUtils->prepareCanonicalUrl(
 
 1020                     $oCategory->getBaseSeoLink($oCategory->getLanguage(), $this->
getActPage())
 
 1023                 $sUrl = $oUtils->prepareCanonicalUrl(
 
 1024                     $oCategory->getBaseStdLink($oCategory->getLanguage(), $this->
getActPage())
 
 1039         return $this->
getConfig()->getConfigParam(
'blShowListDisplayType');