/** * Sets details locator data for articles that came from vendor list. * * @param oxUBase $oLocatorTarget oxUBase object * @param oxArticle $oCurrArticle current article */ protected function _setVendorLocatorData($oLocatorTarget, $oCurrArticle) { if ($oVendor = $oLocatorTarget->getActVendor()) { $sVendorId = $oVendor->getId(); $myUtils = oxRegistry::getUtils(); $blSeo = $myUtils->seoIsActive(); // loading data for article navigation $oIdList = oxNew("oxArticleList"); if ($oLocatorTarget->showSorting()) { $oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent())); } $oIdList->loadVendorIds($sVendorId); //page number $iPage = $this->_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle); $sAdd = null; if (!$blSeo) { $sAdd = 'listtype=vendor&cnid=v_' . $sVendorId; } // setting product position in list, amount of articles etc $oVendor->iCntOfProd = $oIdList->count(); $oVendor->iProductPos = $this->_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget); if ($blSeo && $iPage) { $oVendor->toListLink = oxRegistry::get("oxSeoEncoderVendor")->getVendorPageUrl($oVendor, $iPage); } else { $oVendor->toListLink = $this->_makeLink($oVendor->getLink(), $this->_getPageNumber($iPage)); } $oNextProduct = $this->_oNextProduct; $oBackProduct = $this->_oBackProduct; $oVendor->nextProductLink = $oNextProduct ? $this->_makeLink($oNextProduct->getLink(), $sAdd) : null; $oVendor->prevProductLink = $oBackProduct ? $this->_makeLink($oBackProduct->getLink(), $sAdd) : null; } }