/** * Sets details locator data for articles that came from regular list. * * @param oxUBase $oLocatorTarget view object * @param oxArticle $oCurrArticle current article */ protected function _setListLocatorData($oLocatorTarget, $oCurrArticle) { // if no active category is loaded - lets check for category passed by post/get if ($oCategory = $oLocatorTarget->getActiveCategory()) { $sOrderBy = null; if ($oLocatorTarget->showSorting()) { $sOrderBy = $oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()); } $oIdList = $this->_loadIdsInList($oCategory, $oCurrArticle, $sOrderBy); //page number $iPage = $this->_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle); // setting product position in list, amount of articles etc $oCategory->iCntOfProd = $oIdList->count(); $oCategory->iProductPos = $this->_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget); if (oxRegistry::getUtils()->seoIsActive() && $iPage) { /** @var oxSeoEncoderCategory $oSeoEncoderCategory */ $oSeoEncoderCategory = oxRegistry::get("oxSeoEncoderCategory"); $oCategory->toListLink = $oSeoEncoderCategory->getCategoryPageUrl($oCategory, $iPage); } else { $oCategory->toListLink = $this->_makeLink($oCategory->getLink(), $this->_getPageNumber($iPage)); } $oNextProduct = $this->_oNextProduct; $oBackProduct = $this->_oBackProduct; $oCategory->nextProductLink = $oNextProduct ? $this->_makeLink($oNextProduct->getLink(), '') : null; $oCategory->prevProductLink = $oBackProduct ? $this->_makeLink($oBackProduct->getLink(), '') : null; // active category $oLocatorTarget->setActiveCategory($oCategory); // category path if ($oCatTree = $oLocatorTarget->getCategoryTree()) { $oLocatorTarget->setCatTreePath($oCatTree->getPath()); } } }