OXID eShop CE  4.9.8
 All Classes Files Functions Variables Pages
article_main.php
Go to the documentation of this file.
1 <?php
2 
10 {
11 
18  public function render()
19  {
21 
22  $this->getConfig()->setConfigParam('bl_perfLoadPrice', true);
23 
24  $oArticle = oxNew('oxArticle');
25  $oArticle->enablePriceLoad();
26 
27  $this->_aViewData['edit'] = $oArticle;
28 
29  $sOxId = $this->getEditObjectId();
30  $sVoxId = $this->getConfig()->getRequestParameter("voxid");
31  $sOxParentId = $this->getConfig()->getRequestParameter("oxparentid");
32 
33  // new variant ?
34  if (isset($sVoxId) && $sVoxId == "-1" && isset($sOxParentId) && $sOxParentId && $sOxParentId != "-1") {
35  $oParentArticle = oxNew("oxArticle");
36  $oParentArticle->load($sOxParentId);
37  $this->_aViewData["parentarticle"] = $oParentArticle;
38  $this->_aViewData["oxparentid"] = $sOxParentId;
39 
40  $this->_aViewData["oxid"] = $sOxId = "-1";
41  }
42 
43  if ($sOxId && $sOxId != "-1") {
44 
45  // load object
46  $oArticle->loadInLang($this->_iEditLang, $sOxId);
47 
48 
49  // load object in other languages
50  $oOtherLang = $oArticle->getAvailableInLangs();
51  if (!isset($oOtherLang[$this->_iEditLang])) {
52  // echo "language entry doesn't exist! using: ".key($oOtherLang);
53  $oArticle->loadInLang(key($oOtherLang), $sOxId);
54  }
55 
56  // variant handling
57  if ($oArticle->oxarticles__oxparentid->value) {
58  $oParentArticle = oxNew("oxArticle");
59  $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
60  $this->_aViewData["parentarticle"] = $oParentArticle;
61  $this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
62  $this->_aViewData["issubvariant"] = 1;
63  }
64 
65  // #381A
66  $this->_formJumpList($oArticle, $oParentArticle);
67 
68  //loading tags
69  $oArticleTagList = oxNew("oxArticleTagList");
70  $oArticleTagList->loadInLang($this->_iEditLang, $oArticle->getId());
71  $oArticle->tags = $oArticleTagList->get();
72 
73  $aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
74  if (count($aLang)) {
75  $this->_aViewData["posslang"] = $aLang;
76  }
77 
78  foreach ($oOtherLang as $id => $language) {
79  $oLang = new stdClass();
80  $oLang->sLangDesc = $language;
81  $oLang->selected = ($id == $this->_iEditLang);
82  $this->_aViewData["otherlang"][$id] = clone $oLang;
83  }
84  }
85 
86  $this->_aViewData["editor"] = $this->_generateTextEditor(
87  "100%",
88  300,
89  $oArticle,
90  "oxarticles__oxlongdesc",
91  "details.tpl.css"
92  );
93  $this->_aViewData["blUseTimeCheck"] = $this->getConfig()->getConfigParam('blUseTimeCheck');
94 
95  return "article_main.tpl";
96  }
97 
106  protected function _getEditValue($oObject, $sField)
107  {
108  $sEditObjectValue = '';
109  if ($oObject) {
110  $oDescField = $oObject->getLongDescription();
111  $sEditObjectValue = $this->_processEditValue($oDescField->getRawValue());
112  $oDescField = new oxField($sEditObjectValue, oxField::T_RAW);
113  }
114 
115  return $sEditObjectValue;
116  }
117 
121  public function save()
122  {
123  parent::save();
124 
125  $oConfig = $this->getConfig();
126  $soxId = $this->getEditObjectId();
127  $aParams = $oConfig->getRequestParameter("editval");
128 
129  // default values
130  $aParams = $this->addDefaultValues($aParams);
131 
132  // null values
133  if (isset($aParams['oxarticles__oxvat']) && $aParams['oxarticles__oxvat'] === '') {
134  $aParams['oxarticles__oxvat'] = null;
135  }
136 
137  // varianthandling
138  $soxparentId = $oConfig->getRequestParameter("oxparentid");
139  if (isset($soxparentId) && $soxparentId && $soxparentId != "-1") {
140  $aParams['oxarticles__oxparentid'] = $soxparentId;
141  } else {
142  unset($aParams['oxarticles__oxparentid']);
143  }
144 
145  $oArticle = oxNew("oxarticle");
146  $oArticle->setLanguage($this->_iEditLang);
147 
148  if ($soxId != "-1") {
149  $oArticle->loadInLang($this->_iEditLang, $soxId);
150  } else {
151  $aParams['oxarticles__oxid'] = null;
152  $aParams['oxarticles__oxissearch'] = 1;
153  $aParams['oxarticles__oxstockflag'] = 1;
154  if (empty($aParams['oxarticles__oxstock'])) {
155  $aParams['oxarticles__oxstock'] = 0;
156  }
157 
158  // shopid
159  $aParams['oxarticles__oxshopid'] = oxRegistry::getSession()->getVariable("actshop");
160 
161  if (!isset($aParams['oxarticles__oxactive'])) {
162  $aParams['oxarticles__oxactive'] = 0;
163  }
164  }
165 
166  //article number handling, warns for artnum dublicates
167  if (isset($aParams['oxarticles__oxartnum']) && strlen($aParams['oxarticles__oxartnum']) > 0 &&
168  $oConfig->getConfigParam('blWarnOnSameArtNums') &&
169  $oArticle->oxarticles__oxartnum->value != $aParams['oxarticles__oxartnum']
170  ) {
171  $sSelect = "select oxid from " . getViewName('oxarticles');
172  $sSelect .= " where oxartnum = '" . $aParams['oxarticles__oxartnum'] . "'";
173  $sSelect .= " and oxid != '" . $aParams['oxarticles__oxid'] . "'";
174  if ($oArticle->assignRecord($sSelect)) {
175  $this->_aViewData["errorsavingatricle"] = 1;
176  }
177  }
178 
179 
180  // #905A resetting article count in price categories if price has been changed
181  $sOxIdField = 'oxarticles__oxid';
182  $sPriceField = 'oxarticles__oxprice';
183  $sActiveField = 'oxarticles__oxactive';
184  $sVendorField = 'oxarticles__oxvendorid';
185  $sManufacturerField = 'oxarticles__oxmanufacturerid';
186  if (isset($aParams[$sPriceField]) && $aParams[$sPriceField] != $oArticle->$sPriceField->value) {
187  $this->resetCounter("priceCatArticle", $oArticle->$sPriceField->value);
188  }
189 
190  $aResetIds = array();
191  if (isset($aParams[$sActiveField]) && $aParams[$sActiveField] != $oArticle->$sActiveField->value) {
192  //check categories
193  $this->_resetCategoriesCounter($oArticle->$sOxIdField->value);
194 
195  // vendors
196  $aResetIds['vendor'][$oArticle->$sVendorField->value] = 1;
197  $aResetIds['manufacturer'][$oArticle->$sManufacturerField->value] = 1;
198  }
199 
200  // vendors
201  if (isset($aParams[$sVendorField]) && $aParams[$sVendorField] != $oArticle->$sVendorField->value) {
202  $aResetIds['vendor'][$aParams[$sVendorField]] = 1;
203  $aResetIds['vendor'][$oArticle->$sVendorField->value] = 1;
204  }
205 
206  // manufacturers
207  if (isset($aParams[$sManufacturerField]) &&
208  $aParams[$sManufacturerField] != $oArticle->$sManufacturerField->value) {
209 
210  $aResetIds['manufacturer'][$aParams[$sManufacturerField]] = 1;
211  $aResetIds['manufacturer'][$oArticle->$sManufacturerField->value] = 1;
212  }
213 
214  // resetting counts
215  $this->_resetCounts($aResetIds);
216 
217  $oArticle->setLanguage(0);
218 
219  //triming spaces from article title (M:876)
220  if (isset($aParams['oxarticles__oxtitle'])) {
221  $aParams['oxarticles__oxtitle'] = trim($aParams['oxarticles__oxtitle']);
222  }
223 
224  $oArticle->assign($aParams);
225  $oArticle->setArticleLongDesc($this->_processLongDesc($aParams['oxarticles__oxlongdesc']));
226  $oArticle->setLanguage($this->_iEditLang);
227  $oArticle = oxRegistry::get("oxUtilsFile")->processFiles($oArticle);
228  $oArticle->save();
229 
230  // set oxid if inserted
231  if ($soxId == "-1") {
232  $sFastCat = $oConfig->getRequestParameter("art_category");
233  if ($sFastCat != "-1") {
234  $this->addToCategory($sFastCat, $oArticle->getId());
235  }
236  }
237 
238  //saving tags
239  if (isset($aParams['tags'])) {
240  $sTags = $aParams['tags'];
241  if (!trim($sTags)) {
242  $sTags = $oArticle->oxarticles__oxsearchkeys->value;
243  }
244  $aInvalidTags = $this->_setTags($sTags, $oArticle->getId());
245  if (!empty($aInvalidTags)) {
246  $this->_aViewData["invalid_tags"] = implode(', ', $aInvalidTags);
247  }
248  }
249 
250  $this->setEditObjectId($oArticle->getId());
251  }
252 
260  protected function _processLongDesc($sValue)
261  {
262  // TODO: the code below is redundant, optimize it, assignments should go smooth without conversions
263  // hack, if editor screws up text, htmledit tends to do so
264  $sValue = str_replace('&amp;nbsp;', '&nbsp;', $sValue);
265  $sValue = str_replace('&amp;', '&', $sValue);
266  $sValue = str_replace('&quot;', '"', $sValue);
267  $sValue = str_replace('&lang=', '&amp;lang=', $sValue);
268  $sValue = str_replace('<p>&nbsp;</p>', '', $sValue);
269  $sValue = str_replace('<p>&nbsp; </p>', '', $sValue);
270 
271  return $sValue;
272  }
273 
279  protected function _resetCategoriesCounter($sArticleId)
280  {
281  $oDb = oxDb::getDb();
282  $sQ = "select oxcatnid from oxobject2category where oxobjectid = " . $oDb->quote($sArticleId);
283  $oRs = $oDb->execute($sQ);
284  if ($oRs !== false && $oRs->recordCount() > 0) {
285  while (!$oRs->EOF) {
286  $this->resetCounter("catArticle", $oRs->fields[0]);
287  $oRs->moveNext();
288  }
289  }
290  }
291 
300  protected function _setTags($sTags, $sArticleId)
301  {
302  $oArticleTagList = oxNew('oxarticletaglist');
303  $oArticleTagList->loadInLang($this->_iEditLang, $sArticleId);
304  $oArticleTagList->set($sTags);
305  $oArticleTagList->save();
306 
307  return $oArticleTagList->get()->getInvalidTags();
308  }
309 
316  public function addToCategory($sCatID, $sOXID)
317  {
318  $myConfig = $this->getConfig();
319 
320  $oNew = oxNew("oxbase");
321  $oNew->init("oxobject2category");
322  $oNew->oxobject2category__oxtime = new oxField(0);
323  $oNew->oxobject2category__oxobjectid = new oxField($sOXID);
324  $oNew->oxobject2category__oxcatnid = new oxField($sCatID);
325 
326  $oNew->save();
327 
328  // resetting amount of articles in category
329  $this->resetCounter("catArticle", $sCatID);
330  }
331 
339  public function copyArticle($sOldId = null, $sNewId = null, $sParentId = null)
340  {
341  $myConfig = $this->getConfig();
342 
343  $sOldId = $sOldId ? $sOldId : $this->getEditObjectId();
344  $sNewId = $sNewId ? $sNewId : oxUtilsObject::getInstance()->generateUID();
345 
346  $oArticle = oxNew('oxbase');
347  $oArticle->init('oxarticles');
348  if ($oArticle->load($sOldId)) {
349 
350  if ($myConfig->getConfigParam('blDisableDublArtOnCopy')) {
351  $oArticle->oxarticles__oxactive->setValue(0);
352  $oArticle->oxarticles__oxactivefrom->setValue(0);
353  $oArticle->oxarticles__oxactiveto->setValue(0);
354  }
355 
356  // setting parent id
357  if ($sParentId) {
358  $oArticle->oxarticles__oxparentid->setValue($sParentId);
359  }
360 
361  // setting oxinsert/oxtimestamp
362  $iNow = date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime());
363  $oArticle->oxarticles__oxinsert = new oxField($iNow);
364 
365  // mantis#0001590: OXRATING and OXRATINGCNT not set to 0 when copying article
366  $oArticle->oxarticles__oxrating = new oxField(0);
367  $oArticle->oxarticles__oxratingcnt = new oxField(0);
368 
369  $oArticle->setId($sNewId);
370  $oArticle->save();
371 
372  //copy categories
373  $this->_copyCategories($sOldId, $sNewId);
374 
375  //atributes
376  $this->_copyAttributes($sOldId, $sNewId);
377 
378  //sellist
379  $this->_copySelectlists($sOldId, $sNewId);
380 
381  //crossseling
382  $this->_copyCrossseling($sOldId, $sNewId);
383 
384  //accessoire
385  $this->_copyAccessoires($sOldId, $sNewId);
386 
387  // #983A copying staffelpreis info
388  $this->_copyStaffelpreis($sOldId, $sNewId);
389 
390  //copy article extends (longdescription, tags)
391  $this->_copyArtExtends($sOldId, $sNewId);
392 
393  //files
394  $this->_copyFiles($sOldId, $sNewId);
395 
396  // resetting
397  $aResetIds['vendor'][$oArticle->oxarticles__oxvendorid->value] = 1;
398  $aResetIds['manufacturer'][$oArticle->oxarticles__oxmanufacturerid->value] = 1;
399  $this->_resetCounts($aResetIds);
400 
401  $this->resetContentCache();
402 
403  $myUtilsObject = oxUtilsObject::getInstance();
404  $oDb = oxDb::getDb();
405 
406  //copy variants
407  $sQ = "select oxid from oxarticles where oxparentid = " . $oDb->quote($sOldId);
408  $oRs = $oDb->execute($sQ);
409  if ($oRs !== false && $oRs->recordCount() > 0) {
410  while (!$oRs->EOF) {
411  $this->copyArticle($oRs->fields[0], $myUtilsObject->generateUid(), $sNewId);
412  $oRs->moveNext();
413  }
414  }
415 
416  // only for top articles
417  if (!$sParentId) {
418 
419  $this->setEditObjectId($oArticle->getId());
420 
421  //article number handling, warns for artnum dublicates
422  $sFncParameter = oxRegistry::getConfig()->getRequestParameter('fnc');
423  $sArtNumField = 'oxarticles__oxartnum';
424  if ($myConfig->getConfigParam('blWarnOnSameArtNums') &&
425  $oArticle->$sArtNumField->value && $sFncParameter == 'copyArticle'
426  ) {
427  $sSelect = "select oxid from " . $oArticle->getCoreTableName() .
428  " where oxartnum = " . $oDb->quote($oArticle->$sArtNumField->value) .
429  " and oxid != " . $oDb->quote($sNewId);
430 
431  if ($oArticle->assignRecord($sSelect)) {
432  $this->_aViewData["errorsavingatricle"] = 1;
433  }
434  }
435  }
436  }
437  }
438 
445  protected function _copyCategories($sOldId, $sNewId)
446  {
447  $myUtilsObject = oxUtilsObject::getInstance();
448  $oDb = oxDb::getDb();
449 
450  $sO2CView = getViewName('oxobject2category');
451  $sQ = "select oxcatnid, oxtime from {$sO2CView} where oxobjectid = " . $oDb->quote($sOldId);
452  $oRs = $oDb->execute($sQ);
453  if ($oRs !== false && $oRs->recordCount() > 0) {
454  while (!$oRs->EOF) {
455  $sUid = $myUtilsObject->generateUid();
456  $sCatId = $oRs->fields[0];
457  $sTime = $oRs->fields[1];
458 
459 
460  $sSql = "insert into oxobject2category (oxid, oxobjectid, oxcatnid, oxtime) " .
461  "VALUES (" . $oDb->quote($sUid) . ", " . $oDb->quote($sNewId) . ", " .
462  $oDb->quote($sCatId) . ", " . $oDb->quote($sTime) . ") ";
463  $oDb->execute($sSql);
464 
465  $oRs->moveNext();
466 
467  // resetting article count in category
468  $this->resetCounter("catArticle", $sCatId);
469  }
470  }
471  }
472 
479  protected function _copyAttributes($sOldId, $sNewId)
480  {
481  $myUtilsObject = oxUtilsObject::getInstance();
482  $oDb = oxDb::getDb();
483 
484  $sQ = "select oxid from oxobject2attribute where oxobjectid = " . $oDb->quote($sOldId);
485  $oRs = $oDb->execute($sQ);
486  if ($oRs !== false && $oRs->recordCount() > 0) {
487  while (!$oRs->EOF) {
488  // #1055A
489  $oAttr = oxNew("oxbase");
490  $oAttr->init("oxobject2attribute");
491  $oAttr->load($oRs->fields[0]);
492  $oAttr->setId($myUtilsObject->generateUID());
493  $oAttr->oxobject2attribute__oxobjectid->setValue($sNewId);
494  $oAttr->save();
495  $oRs->moveNext();
496  }
497  }
498  }
499 
506  protected function _copyFiles($sOldId, $sNewId)
507  {
508  $myUtilsObject = oxUtilsObject::getInstance();
509  $oDb = oxDb::getDb(oxDB::FETCH_MODE_ASSOC);
510 
511  $sQ = "SELECT * FROM `oxfiles` WHERE `oxartid` = " . $oDb->quote($sOldId);
512  $oRs = $oDb->execute($sQ);
513  if ($oRs !== false && $oRs->recordCount() > 0) {
514  while (!$oRs->EOF) {
515 
516  $oFile = oxNew("oxfile");
517  $oFile->setId($myUtilsObject->generateUID());
518  $oFile->oxfiles__oxartid = new oxField($sNewId);
519  $oFile->oxfiles__oxfilename = new oxField($oRs->fields['OXFILENAME']);
520  $oFile->oxfiles__oxfilesize = new oxField($oRs->fields['OXFILESIZE']);
521  $oFile->oxfiles__oxstorehash = new oxField($oRs->fields['OXSTOREHASH']);
522  $oFile->oxfiles__oxpurchasedonly = new oxField($oRs->fields['OXPURCHASEDONLY']);
523  $oFile->save();
524  $oRs->moveNext();
525  }
526  }
527  }
528 
535  protected function _copySelectlists($sOldId, $sNewId)
536  {
537  $myUtilsObject = oxUtilsObject::getInstance();
538  $oDb = oxDb::getDb();
539 
540  $sQ = "select oxselnid from oxobject2selectlist where oxobjectid = " . $oDb->quote($sOldId);
541  $oRs = $oDb->execute($sQ);
542  if ($oRs !== false && $oRs->recordCount() > 0) {
543  while (!$oRs->EOF) {
544  $sUid = $myUtilsObject->generateUID();
545  $sId = $oRs->fields[0];
546  $sSql = "insert into oxobject2selectlist (oxid, oxobjectid, oxselnid) " .
547  "VALUES (" . $oDb->quote($sUid) . ", " . $oDb->quote($sNewId) . ", " . $oDb->quote($sId) . ") ";
548  $oDb->execute($sSql);
549  $oRs->moveNext();
550  }
551  }
552  }
553 
560  protected function _copyCrossseling($sOldId, $sNewId)
561  {
562  $myUtilsObject = oxUtilsObject::getInstance();
563  $oDb = oxDb::getDb();
564 
565  $sQ = "select oxobjectid from oxobject2article where oxarticlenid = " . $oDb->quote($sOldId);
566  $oRs = $oDb->execute($sQ);
567  if ($oRs !== false && $oRs->recordCount() > 0) {
568  while (!$oRs->EOF) {
569  $sUid = $myUtilsObject->generateUID();
570  $sId = $oRs->fields[0];
571  $sSql = "insert into oxobject2article (oxid, oxobjectid, oxarticlenid) " .
572  "VALUES (" . $oDb->quote($sUid) . ", " . $oDb->quote($sId) . ", " . $oDb->quote($sNewId) . " ) ";
573  $oDb->execute($sSql);
574  $oRs->moveNext();
575  }
576  }
577  }
578 
585  protected function _copyAccessoires($sOldId, $sNewId)
586  {
587  $myUtilsObject = oxUtilsObject::getInstance();
588  $oDb = oxDb::getDb();
589 
590  $sQ = "select oxobjectid from oxaccessoire2article where oxarticlenid= " . $oDb->quote($sOldId);
591  $oRs = $oDb->execute($sQ);
592  if ($oRs !== false && $oRs->recordCount() > 0) {
593  while (!$oRs->EOF) {
594  $sUId = $myUtilsObject->generateUid();
595  $sId = $oRs->fields[0];
596  $sSql = "insert into oxaccessoire2article (oxid, oxobjectid, oxarticlenid) " .
597  "VALUES (" . $oDb->quote($sUId) . ", " . $oDb->quote($sId) . ", " . $oDb->quote($sNewId) . ") ";
598  $oDb->execute($sSql);
599  $oRs->moveNext();
600  }
601  }
602  }
603 
610  protected function _copyStaffelpreis($sOldId, $sNewId)
611  {
612  $sShopId = $this->getConfig()->getShopId();
613  $oPriceList = oxNew("oxlist");
614  $oPriceList->init("oxbase", "oxprice2article");
615  $sQ = "select * from oxprice2article where oxartid = '{$sOldId}' and oxshopid = '{$sShopId}' " .
616  "and (oxamount > 0 or oxamountto > 0) order by oxamount ";
617  $oPriceList->selectString($sQ);
618  if ($oPriceList->count()) {
619  foreach ($oPriceList as $oItem) {
620  $oItem->oxprice2article__oxid->setValue($oItem->setId());
621  $oItem->oxprice2article__oxartid->setValue($sNewId);
622  $oItem->save();
623  }
624  }
625  }
626 
633  protected function _copyArtExtends($sOldId, $sNewId)
634  {
635  $oExt = oxNew("oxbase");
636  $oExt->init("oxartextends");
637  $oExt->load($sOldId);
638  $oExt->setId($sNewId);
639  $oExt->save();
640  }
641 
642 
646  public function saveinnlang()
647  {
648  $this->save();
649  }
650 
659  public function addDefaultValues($aParams)
660  {
661  return $aParams;
662  }
663 
670  protected function _formJumpList($oArticle, $oParentArticle)
671  {
672  $aJumpList = array();
673  //fetching parent article variants
674  $sOxIdField = 'oxarticles__oxid';
675  if (isset($oParentArticle)) {
676  $aJumpList[] = array($oParentArticle->$sOxIdField->value, $this->_getTitle($oParentArticle));
677  $sEditLanguageParameter = oxRegistry::getConfig()->getRequestParameter("editlanguage");
678  $oParentVariants = $oParentArticle->getAdminVariants($sEditLanguageParameter);
679  if ($oParentVariants->count()) {
680  foreach ($oParentVariants as $oVar) {
681  $aJumpList[] = array($oVar->$sOxIdField->value, " - " . $this->_getTitle($oVar));
682  if ($oVar->$sOxIdField->value == $oArticle->$sOxIdField->value) {
683  $oVariants = $oArticle->getAdminVariants($sEditLanguageParameter);
684  if ($oVariants->count()) {
685  foreach ($oVariants as $oVVar) {
686  $aJumpList[] = array($oVVar->$sOxIdField->value, " -- " . $this->_getTitle($oVVar));
687  }
688  }
689  }
690  }
691  }
692  } else {
693  $aJumpList[] = array($oArticle->$sOxIdField->value, $this->_getTitle($oArticle));
694  //fetching this article variants data
695  $oVariants = $oArticle->getAdminVariants(oxRegistry::getConfig()->getRequestParameter("editlanguage"));
696  if ($oVariants && $oVariants->count()) {
697  foreach ($oVariants as $oVar) {
698  $aJumpList[] = array($oVar->$sOxIdField->value, " - " . $this->_getTitle($oVar));
699  }
700  }
701  }
702  if (count($aJumpList) > 1) {
703  $this->_aViewData["thisvariantlist"] = $aJumpList;
704  }
705  }
706 
714  protected function _getTitle($oObj)
715  {
716  $sTitle = $oObj->oxarticles__oxtitle->value;
717  if (!strlen($sTitle)) {
718  $sTitle = $oObj->oxarticles__oxvarselect->value;
719  }
720 
721  return $sTitle;
722  }
723 
729  public function getCategoryList()
730  {
731  $oCatTree = oxNew("oxCategoryList");
732  $oCatTree->loadList();
733 
734  return $oCatTree;
735  }
736 
742  public function getVendorList()
743  {
744  $oVendorlist = oxNew("oxvendorlist");
745  $oVendorlist->loadVendorList();
746 
747  return $oVendorlist;
748  }
749 
755  public function getManufacturerList()
756  {
757  $oManufacturerList = oxNew("oxmanufacturerlist");
758  $oManufacturerList->loadManufacturerList();
759 
760  return $oManufacturerList;
761  }
762 }