/** * return Vat value for oxcategory type assignment only * * @param Article $oArticle given article * * @return float | false */ protected function _getVatForArticleCategory(Article $oArticle) { $oDb = oxDb::getDb(); $sCatT = getViewName('oxcategories'); if ($this->_blCatVatSet === null) { $sSelect = "SELECT oxid FROM {$sCatT} WHERE oxvat IS NOT NULL LIMIT 1"; //no category specific vats in shop? //then for performance reasons we just return false $this->_blCatVatSet = (bool) $oDb->getOne($sSelect); } if (!$this->_blCatVatSet) { return false; } $sO2C = getViewName('oxobject2category'); $sSql = "SELECT c.oxvat\n FROM {$sCatT} AS c, {$sO2C} AS o2c\n WHERE c.oxid=o2c.oxcatnid AND\n o2c.oxobjectid = " . $oDb->quote($oArticle->getId()) . " AND\n c.oxvat IS NOT NULL\n ORDER BY o2c.oxtime "; $fVat = $oDb->getOne($sSql); if ($fVat !== false && $fVat !== null) { return $fVat; } return false; }
/** * 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()); }