Ejemplo n.º 1
0
 /**
  * loads 'Recommendation lists' rss data
  *
  * @param oxArticle $oArticle load lists for this article
  *
  * @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
  *
  * @return null
  */
 public function loadRecommLists(Article $oArticle)
 {
     if ($this->_aChannel = $this->_loadFromCache(self::RSS_ARTRECOMMLISTS . $oArticle->getId())) {
         return;
     }
     $oConfig = $this->getConfig();
     $oConfig->setConfigParam('iNrofCrossellArticles', $oConfig->getConfigParam('iRssItemsCount'));
     $oList = oxNew('oxrecommlist')->getRecommListsByIds(array($oArticle->getId()));
     if ($oList == null) {
         $oList = oxNew('oxlist');
     }
     $oLang = Registry::getLang();
     $this->_loadData(self::RSS_ARTRECOMMLISTS . $oArticle->getId(), $this->getRecommListsTitle($oArticle), sprintf($oLang->translateString('LISTMANIA_LIST_FOR', $oLang->getBaseLanguage()), $oArticle->oxarticles__oxtitle->value), $this->_getRecommListItems($oList), $this->getRecommListsUrl($oArticle), $oArticle->getLink());
 }
Ejemplo n.º 2
0
 /**
  * get article user vat
  *
  * @param Article $oArticle article object
  *
  * @return double | false
  */
 public function getArticleUserVat(Article $oArticle)
 {
     if ($oUser = $oArticle->getArticleUser()) {
         return $this->getUserVat($oUser);
     }
     return false;
 }
Ejemplo n.º 3
0
 /**
  * Test enable price load.
  *
  * @depends testDisablePriceLoad
  *
  * @param oxArticle $oArticle
  *
  * @return null
  */
 public function testEnablePriceLoad(\OxidEsales\EshopCommunity\Application\Model\Article $oArticle)
 {
     $oArticle->enablePriceLoad();
     $this->assertNotNull($oArticle->getBasePrice());
 }