/** * Returns SEO uri for passed article. * * @param oxarticle $oArticle Article object. * @param string $sActCatId */ public function pingArticleCategoryUrl($oArticle, $sActCatId) { $oActCat = $this->getCategoryById($sActCatId); $iLang = $oArticle->getLanguage(); if (!($sSeoUri = $this->_loadFromDb('oxarticle', $oArticle->getId(), $iLang, null, $sActCatId, true))) { if ($oActCat) { $blInCat = false; if ($oActCat->isPriceCategory()) { $blInCat = $oArticle->inPriceCategory($sActCatId); } else { $blInCat = $oArticle->inCategory($sActCatId); } if ($blInCat) { $this->_createArticleCategoryUri($oArticle, $oActCat, $iLang); } } } }
/** * return article main url, with path of its default category * * @param oxarticle $oArticle product * @param int $iLang language id * * @return string */ public function getArticleMainUrl($oArticle, $iLang = null) { if (!isset($iLang)) { $iLang = $oArticle->getLanguage(); } return $this->_getFullUrl($this->_getArticleMainUri($oArticle, $iLang), $iLang); }