OXID eShop CE  4.9.9
 All Classes Files Functions Variables Pages
article_crossselling.php
Go to the documentation of this file.
1 <?php
2 
10 {
11 
19  public function render()
20  {
22 
23  $this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
24 
25  // crossselling
26  $this->_createCategoryTree("artcattree");
27 
28  // accessoires
29  $this->_createCategoryTree("artcattree2");
30 
31  $soxId = $this->getEditObjectId();
32  if ($soxId != "-1" && isset($soxId)) {
33  // load object
34  $oArticle->load($soxId);
35 
36  if ($oArticle->isDerived()) {
37  $this->_aViewData['readonly'] = true;
38  }
39  }
40 
41  $iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
42  if ($iAoc == 1) {
43  $oArticleCrossellingAjax = oxNew('article_crossselling_ajax');
44  $this->_aViewData['oxajax'] = $oArticleCrossellingAjax->getColumns();
45 
46  return "popups/article_crossselling.tpl";
47  } elseif ($iAoc == 2) {
48  $oArticleAccessoriesAjax = oxNew('article_accessories_ajax');
49  $this->_aViewData['oxajax'] = $oArticleAccessoriesAjax->getColumns();
50 
51  return "popups/article_accessories.tpl";
52  }
53 
54  return "article_crossselling.tpl";
55  }
56 }