44             $this->_sType = trim($sType);
 
   56         $sLocfnc = 
"_set{$this->_sType}LocatorData";
 
   57         $this->$sLocfnc($oLocatorTarget, $oCurrArticle);
 
   60         $oLocatorTarget->setListType($this->_sType);
 
   72         if (($oCategory = $oLocatorTarget->getActiveCategory())) {
 
   75             if ($oLocatorTarget->showSorting()) {
 
   76                 $sOrderBy = $oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent());
 
   79             $oIdList = $this->
_loadIdsInList($oCategory, $oCurrArticle, $sOrderBy);
 
   82             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
   85             $oCategory->iCntOfProd = $oIdList->count();
 
   86             $oCategory->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
   91                 $oCategory->toListLink = $oSeoEncoderCategory->getCategoryPageUrl($oCategory, $iPage);
 
   98             $oCategory->nextProductLink = $oNextProduct ? $this->
_makeLink($oNextProduct->getLink(), 
'') : null;
 
   99             $oCategory->prevProductLink = $oBackProduct ? $this->
_makeLink($oBackProduct->getLink(), 
'') : null;
 
  102             $oLocatorTarget->setActiveCategory($oCategory);
 
  105             if (($oCatTree = $oLocatorTarget->getCategoryTree())) {
 
  106                 $oLocatorTarget->setCatTreePath($oCatTree->getPath());
 
  119         if (($oVendor = $oLocatorTarget->getActVendor())) {
 
  120             $sVendorId = $oVendor->getId();
 
  123             $blSeo = $myUtils->seoIsActive();
 
  126             $oIdList = 
oxNew(
"oxArticleList");
 
  127             if ($oLocatorTarget->showSorting()) {
 
  128                 $oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()));
 
  130             $oIdList->loadVendorIds($sVendorId);
 
  133             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
  137                 $sAdd = 
'listtype=vendor&cnid=v_' . $sVendorId;
 
  141             $oVendor->iCntOfProd = $oIdList->count();
 
  142             $oVendor->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
  144             if ($blSeo && $iPage) {
 
  145                 $oVendor->toListLink = 
oxRegistry::get(
"oxSeoEncoderVendor")->getVendorPageUrl($oVendor, $iPage);
 
  152             $oVendor->nextProductLink = $oNextProduct ? $this->
_makeLink($oNextProduct->getLink(), $sAdd) : null;
 
  153             $oVendor->prevProductLink = $oBackProduct ? $this->
_makeLink($oBackProduct->getLink(), $sAdd) : null;
 
  165         if (($oManufacturer = $oLocatorTarget->getActManufacturer())) {
 
  166             $sManufacturerId = $oManufacturer->getId();
 
  169             $blSeo = $myUtils->seoIsActive();
 
  172             $oIdList = 
oxNew(
"oxarticlelist");
 
  173             if ($oLocatorTarget->showSorting()) {
 
  174                 $oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()));
 
  176             $oIdList->loadManufacturerIds($sManufacturerId);
 
  179             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
  183                 $sAdd = 
'listtype=manufacturer&mnid=' . $sManufacturerId;
 
  187             $oManufacturer->iCntOfProd = $oIdList->count();
 
  188             $oManufacturer->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
  190             if ($blSeo && $iPage) {
 
  192                 $oSeoEncoderManufacturer = 
oxRegistry::get(
"oxSeoEncoderManufacturer");
 
  193                 $oManufacturer->toListLink = $oSeoEncoderManufacturer->getManufacturerPageUrl($oManufacturer, $iPage);
 
  200             $oManufacturer->nextProductLink = $oNextProduct ? $this->
_makeLink($oNextProduct->getLink(), $sAdd) : null;
 
  201             $oManufacturer->prevProductLink = $oBackProduct ? $this->
_makeLink($oBackProduct->getLink(), $sAdd) : null;
 
  204             $oLocatorTarget->setActiveCategory($oManufacturer);
 
  207             if (($oManufacturerTree = $oLocatorTarget->getManufacturerTree())) {
 
  208                 $oLocatorTarget->setCatTreePath($oManufacturerTree->getPath());
 
  221         if (($oSearchCat = $oLocatorTarget->getActSearch())) {
 
  226             $sSearchLinkParam = rawurlencode($sSearchParam);
 
  229             $sSearchCat = $sSearchCat ? rawurldecode($sSearchCat) : $sSearchCat;
 
  232             $sSearchVendor = $sSearchVendor ? rawurldecode($sSearchVendor) : $sSearchVendor;
 
  235             $sSearchManufacturer = $sSearchManufacturer ? rawurldecode($sSearchManufacturer) : $sSearchManufacturer;
 
  238             $oIdList = 
oxNew(
'oxarticlelist');
 
  239             if ($oLocatorTarget->showSorting()) {
 
  240                 $oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()));
 
  242             $oIdList->loadSearchIds($sSearchParam, $sSearchCat, $sSearchVendor, $sSearchManufacturer);
 
  245             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
  247             $sAddSearch = 
"searchparam={$sSearchLinkParam}";
 
  248             $sAddSearch .= 
'&listtype=search';
 
  250             if ($sSearchCat !== null) {
 
  251                 $sAddSearch .= 
"&searchcnid={$sSearchCat}";
 
  254             if ($sSearchVendor !== null) {
 
  255                 $sAddSearch .= 
"&searchvendor={$sSearchVendor}";
 
  258             if ($sSearchManufacturer !== null) {
 
  259                 $sAddSearch .= 
"&searchmanufacturer={$sSearchManufacturer}";
 
  263             $oSearchCat->iCntOfProd = $oIdList->count();
 
  264             $oSearchCat->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
  267             $sParams = $sPageNr . ($sPageNr ? 
'&' : 
'') . $sAddSearch;
 
  268             $oSearchCat->toListLink = $this->
_makeLink($oSearchCat->link, $sParams);
 
  271             $oSearchCat->nextProductLink = $oNextProd ? $this->
_makeLink($oNextProd->getLink(), $sAddSearch) : null;
 
  272             $oSearchCat->prevProductLink = $oBackProd ? $this->
_makeLink($oBackProd->getLink(), $sAddSearch) : null;
 
  275             $oLocatorTarget->setSearchTitle(sprintf($sFormat, $sSearchFormParam));
 
  276             $oLocatorTarget->setActiveCategory($oSearchCat);
 
  288         if (($oTag = $oLocatorTarget->getActTag())) {
 
  293             $oIdList = 
oxNew(
'oxarticlelist');
 
  296             if ($oLocatorTarget->showSorting()) {
 
  297                 $oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()));
 
  300             $oIdList->getTagArticleIds($oTag->sTag, $oLang->getBaseLanguage());
 
  303             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
  306             $oTag->iCntOfProd = $oIdList->count();
 
  307             $oTag->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
  310                 $oTag->toListLink = 
oxRegistry::get(
"oxSeoEncoderTag")->getTagPageUrl($oTag->sTag, $iPage);
 
  313                 $oTag->toListLink = $this->
_makeLink($oTag->link, $sPageNr);
 
  318             if (!$myUtils->seoIsActive()) {
 
  320                 $sAddSearch = 
'searchtag=' . rawurlencode($sSearchTagParameter);
 
  321                 $sAddSearch .= 
'&listtype=tag';
 
  326             $oTag->nextProductLink = $oNextProduct ? $this->
_makeLink($oNextProduct->getLink(), $sAddSearch) : null;
 
  327             $oTag->prevProductLink = $oBackProduct ? $this->
_makeLink($oBackProduct->getLink(), $sAddSearch) : null;
 
  329             $sTitle = $oLang->translateString(
'TAGS') . 
' / ' . $oStr->htmlspecialchars($oStr->ucfirst($oTag->sTag));
 
  330             $oLocatorTarget->setSearchTitle($sTitle);
 
  331             $oLocatorTarget->setActiveCategory($oTag);
 
  346         if (($oRecommList = $oLocatorTarget->getActiveRecommList())) {
 
  349             $oIdList = 
oxNew(
'oxarticlelist');
 
  350             $oIdList->loadRecommArticleIds($oRecommList->getId(), null);
 
  353             $iPage = $this->
_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
 
  357             if ($sSearchRecomm !== null) {
 
  359                 $sSearchLinkRecomm = rawurlencode($sSearchRecomm);
 
  360                 $sAddSearch = 
'searchrecomm=' . $sSearchLinkRecomm;
 
  364             $oRecommList->iCntOfProd = $oIdList->count();
 
  365             $oRecommList->iProductPos = $this->
_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
 
  368             if ($blSeo && $iPage) {
 
  371                 $oRecommList->toListLink = $oSeoEncoderRecomm->getRecommPageUrl($oRecommList, $iPage);
 
  375             $oRecommList->toListLink = $this->
_makeLink($oRecommList->toListLink, $sAddSearch);
 
  379                 $sAdd = 
'recommid=' . $oRecommList->getId() . 
'&listtype=recommlist' . ($sAddSearch ? 
'&' : 
'');
 
  381             $sAdd .= $sAddSearch;
 
  384             $oRecommList->nextProductLink = $oNextProduct ? $this->
_makeLink($oNextProduct->getLink(), $sAdd) : null;
 
  385             $oRecommList->prevProductLink = $oBackProduct ? $this->
_makeLink($oBackProduct->getLink(), $sAdd) : null;
 
  388             $sTitle = $oLang->translateString(
'RECOMMLIST');
 
  389             if ($sSearchRecomm !== null) {
 
  390                 $sTitle .= 
" / " . $oLang->translateString(
'RECOMMLIST_SEARCH') . 
' "' . $sSearchFormRecomm . 
'"';
 
  392             $oLocatorTarget->setSearchTitle($sTitle);
 
  393             $oLocatorTarget->setActiveCategory($oRecommList);
 
  408         $oIdList = 
oxNew(
'oxarticlelist');
 
  409         $oIdList->setCustomSorting($sOrderBy);
 
  412         if ($oCategory->isPriceCategory()) {
 
  413             $oIdList->loadPriceIds($oCategory->oxcategories__oxpricefrom->value, $oCategory->oxcategories__oxpriceto->value);
 
  415             $sActCat = $oCategory->getId();
 
  418             if (!isset($oIdList[$oCurrArticle->getId()])) {
 
  419                 $oIdList->loadCategoryIDs($sActCat, null);
 
  437             $sLink .= ((strpos($sLink, 
'?') !== 
false) ? 
'&' : 
'?') . $sParams;
 
  456         $iPageNr = (int) $iPageNr;
 
  459         if (!$iPageNr && $oIdList && $oArticle) {
 
  460             $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
 
  461             $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;
 
  462             $sParentIdField = 
'oxarticles__oxparentid';
 
  463             $sArticleId = $oArticle->$sParentIdField->value ? $oArticle->$sParentIdField->value : $oArticle->getId();
 
  465             $iPageNr = floor($iPos / $iNrofCatArticles);
 
  481         $iPageNr = (int) $iPageNr;
 
  483         return (($iPageNr > 0) ? 
"pgNr=$iPageNr" : 
'');
 
  501         $sOxid = $oArticle->oxarticles__oxparentid->value ? $oArticle->oxarticles__oxparentid->value : $oArticle->getId();
 
  502         if ($oIdList->count() && isset($oIdList[$sOxid])) {
 
  504             $aIds = $oIdList->arrayKeys();
 
  507             if (array_key_exists($iPos - 1, $aIds)) {
 
  508                 $oBackProduct = 
oxNew(
'oxarticle');
 
  509                 $oBackProduct->modifyCacheKey(
'_locator');
 
  510                 $oBackProduct->setNoVariantLoading(
true);
 
  511                 if ($oBackProduct->load($aIds[$iPos - 1])) {
 
  512                     $oBackProduct->setLinkType($oLocatorTarget->getLinkType());
 
  513                     $this->_oBackProduct = $oBackProduct;
 
  517             if (array_key_exists($iPos + 1, $aIds)) {
 
  518                 $oNextProduct = 
oxNew(
'oxarticle');
 
  519                 $oNextProduct->modifyCacheKey(
'_locator');
 
  520                 $oNextProduct->setNoVariantLoading(
true);
 
  521                 if ($oNextProduct->load($aIds[$iPos + 1])) {
 
  522                     $oNextProduct->setLinkType($oLocatorTarget->getLinkType());
 
  523                     $this->_oNextProduct = $oNextProduct;