32 if ($aData && isset($aData[
"oxparams"])) {
34 $iEndPos = $oStr->strpos($aData[
"oxparams"],
"#");
35 $sType = $oStr->substr($aData[
"oxparams"], 0, $iEndPos);
57 if ($aData && isset($aData[
"oxparams"])) {
59 $iStartPos = $oStr->strpos($aData[
"oxparams"],
"#");
60 $iEndPos = $oStr->strpos($aData[
"oxparams"],
"#", $iStartPos + 1);
61 $iLang = $oStr->substr($aData[
"oxparams"], $iEndPos + 1);
63 $aList = reset($aList);
79 if ($aData && isset($aData[
"oxparams"])) {
81 $iStartPos = $oStr->strpos($aData[
"oxparams"],
"#");
82 $iEndPos = $oStr->strpos($aData[
"oxparams"],
"#", $iStartPos + 1);
83 $iLen = $oStr->strlen($aData[
"oxparams"]);
84 $sId = $oStr->substr($aData[
"oxparams"], $iStartPos + 1, $iEndPos - $iLen);
87 $sId = $oItem->getId();
100 if ($this->_aSelectionList === null) {
101 $this->_aSelectionList = array();
103 $oProduct =
oxNew(
'oxarticle');
119 $aLangs = $oProduct->getAvailableInLangs();
120 foreach ($aLangs as $iLang => $sLangTitle) {
121 if ($oTagList = $this->
_getTagList($oProduct, $iLang)) {
122 $this->_aSelectionList[
"oxtag"][$iLang] = $oTagList;
141 if ($oMainCat = $oArticle->getCategory()) {
142 $sMainCatId = $oMainCat->getId();
149 $sView = getViewName(
'oxobject2category');
151 $sSqlForPriceCategories = $oArticle->getSqlForPriceCategories(
'oxid');
152 $sQuotesArticleId = $oDb->quote($oArticle->getId());
153 $sQ =
"select oxobject2category.oxcatnid as oxid from {$sView} as oxobject2category " .
154 "where oxobject2category.oxobjectid=" . $sQuotesArticleId .
" union " . $sSqlForPriceCategories;
156 $oRs = $oDb->execute($sQ);
157 if ($oRs !=
false && $oRs->recordCount() > 0) {
159 $oCat =
oxNew(
'oxcategory');
160 if ($oCat->loadInLang($iLang, current($oRs->fields))) {
161 if ($sMainCatId == $oCat->getId()) {
163 $sTitleField =
'oxcategories__oxtitle';
164 $sTitle = $oCat->$sTitleField->getRawValue() .
" " . $sSuffix;
185 if ($oArticle->oxarticles__oxvendorid->value) {
186 $oVendor =
oxNew(
'oxvendor');
187 if ($oVendor->loadInLang($this->getEditLang(), $oArticle->oxarticles__oxvendorid->value)) {
188 return array($oVendor);
202 if ($oArticle->oxarticles__oxmanufacturerid->value) {
203 $oManufacturer =
oxNew(
'oxmanufacturer');
204 if ($oManufacturer->loadInLang($this->getEditLang(), $oArticle->oxarticles__oxmanufacturerid->value)) {
205 return array($oManufacturer);
222 $oArticleTagList =
oxNew(
"oxarticletaglist");
223 $oArticleTagList->setLanguage($iLang);
224 $oArticleTagList->load($oArticle->getId());
225 $aTagsList = array();
226 if (count($aTags = $oArticleTagList->getArray())) {
227 $sShopId = $this->
getConfig()->getShopId();
228 $iProdId = $oArticle->getId();
229 foreach ($aTags as $sTitle => $oTagObject) {
231 $oTag =
oxNew(
"oxManufacturer");
232 $oTag->setLanguage($iLang);
233 $oTag->setId(md5(strtolower($sShopId . $this->
_getStdUrl($iProdId,
"oxtag",
"tag", $iLang, $sTitle))));
234 $oTag->oxmanufacturers__oxtitle =
new oxField($sTitle);
235 $aTagsList[] = $oTag;
249 $oCat =
oxNew(
'oxcategory');
251 return ($oCat->load($this->getActCatId())) ? $oCat : null;
268 $oProduct =
oxNew(
'oxarticle');
272 foreach ($aList as $oTag) {
273 if ($oTag->getId() == $sTagId) {
274 return $oTag->getTitle();
287 $oVendor =
oxNew(
'oxvendor');
289 return ($this->
getActCatType() ==
'oxvendor' && $oVendor->load($this->getActCatId())) ? $oVendor : null;
299 $oManufacturer =
oxNew(
'oxmanufacturer');
302 return ($blLoaded) ? $oManufacturer : null;
315 case 'oxmanufacturer':
316 return 'manufacturer';
405 $oProduct =
oxNew(
'oxarticle');
406 if ($oProduct->load($this->getEditObjectId())) {
410 return $oEncoder->getArticleVendorUri($oProduct, $this->
getEditLang());
411 case 'oxmanufacturer':
412 return $oEncoder->getArticleManufacturerUri($oProduct, $this->
getEditLang());
415 return $oEncoder->getArticleTagUri($oProduct, $this->
getActCatLang());
419 return $oEncoder->getArticleUri($oProduct, $this->
getEditLang());
421 return $oEncoder->getArticleMainUri($oProduct, $this->
getEditLang());
440 protected function _getStdUrl($sOxid, $sCatType = null, $sListType = null, $iLang = null, $sTag = null)
442 $iLang = $iLang !== null ? $iLang : $this->
getEditLang();
443 $sCatType = $sCatType !== null ? $sCatType : $this->
getActCatType();
444 $sListType = $sListType !== null ? $sListType : $this->
getListType();
448 $aParams[
"listtype"] = $sListType;
451 $oProduct =
oxNew(
'oxarticle');
452 $oProduct->loadInLang($iLang, $sOxid);
459 case 'oxmanufacturer':
464 $aParams[
"searchtag"] = $sTag !== null ? $sTag : $this->
getTag();
474 return trim($oUtilsUrl->appendUrl($oProduct->getBaseStdLink($iLang,
true,
false), $aParams),
'&');
515 $iShopId = $this->
getConfig()->getShopId();
518 $sQ =
"select oxfixed from oxseo where
519 oxseo.oxobjectid = " . $oDb->quote($sId) .
" and
520 oxseo.oxshopid = '{$iShopId}' and oxseo.oxlang = {$iLang} and oxparams = " . $oDb->quote($sParam);
522 return (
bool)
oxDb::getDb()->getOne($sQ,
false,
false);