/** * Sets details locator data for articles that came from vendor list. * * @param oxubase $oLocatorTarget oxubase object * @param oxarticle $oCurrArticle current article * * @return null */ protected function _setVendorLocatorData($oLocatorTarget, $oCurrArticle) { if ($oVendor = $oLocatorTarget->getActVendor()) { $sVendorId = $oVendor->getId(); $myUtils = oxUtils::getInstance(); $blSeo = $myUtils->seoIsActive(); // loading data for article navigation $oIdList = oxNew("oxarticlelist"); if ($oLocatorTarget->showSorting()) { $oLocatorTarget->prepareSortColumns(); $oIdList->setCustomSorting($oLocatorTarget->getSortingSql("{$sVendorId}:vendor")); } $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 = oxSeoEncoderVendor::getInstance()->getVendorPageUrl($oVendor, $iPage); } else { $oVendor->toListLink = $this->_makeLink($oVendor->getLink(), $this->_getPageNumber($iPage)); } $oVendor->nextProductLink = $this->_oNextProduct ? $this->_makeLink($this->_oNextProduct->getLink(), $sAdd) : null; $oVendor->prevProductLink = $this->_oBackProduct ? $this->_makeLink($this->_oBackProduct->getLink(), $sAdd) : null; // active vendor $oLocatorTarget->setActiveCategory($oVendor); // vendor path if ($oVendorTree = $oLocatorTarget->getVendorTree()) { $oLocatorTarget->setCatTreePath($oVendorTree->getPath()); } } }