/**
  * Returns SEO uri for tag.
  *
  * @param oxRecommList $oRecomm recommendation list object
  * @param int          $iLang   language
  *
  * @return string
  */
 public function getRecommUri($oRecomm, $iLang = null)
 {
     if (!($sSeoUrl = $this->_loadFromDb('dynamic', $oRecomm->getId(), $iLang))) {
         $myConfig = $this->getConfig();
         // fetching part of base url
         $sSeoUrl = $this->_getStaticUri($oRecomm->getBaseStdLink($iLang, false), $myConfig->getShopId(), $iLang) . $this->_prepareTitle($oRecomm->oxrecommlists__oxtitle->value, false, $iLang);
         // creating unique
         $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $oRecomm->getId(), $iLang);
         // inserting
         $this->_saveToDb('dynamic', $oRecomm->getId(), $oRecomm->getBaseStdLink($iLang), $sSeoUrl, $iLang, $myConfig->getShopId());
     }
     return $sSeoUrl;
 }
Example #2
0
 /**
  * loads 'Recommendation lists' rss data
  *
  * @param oxRecommList $oRecommList recomm list to load articles from
  *
  * @return null
  */
 public function loadRecommListArticles(oxRecommList $oRecommList)
 {
     if ($this->_aChannel = $this->_loadFromCache(self::RSS_RECOMMLISTARTS . $oRecommList->getId())) {
         return;
     }
     $oList = oxNew('oxarticlelist');
     $oList->loadRecommArticles($oRecommList->getId(), ' order by oxobject2list.oxtimestamp desc limit ' . $this->getConfig()->getConfigParam('iRssItemsCount'));
     $oLang = oxRegistry::getLang();
     $this->_loadData(self::RSS_RECOMMLISTARTS . $oRecommList->getId(), $this->getRecommListArticlesTitle($oRecommList), sprintf($oLang->translateString('LISTMANIA_LIST_PRODUCTS', $oLang->getBaseLanguage()), $oRecommList->oxrecommlists__oxtitle->value), $this->_getArticleItems($oList), $this->getRecommListArticlesUrl($oRecommList), $oRecommList->getLink());
 }