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