OXID eShop CE  4.8.10
 All Classes Files Functions Variables Pages
discount_articles.php
Go to the documentation of this file.
1 <?php
2 
10 {
17  public function render()
18  {
20 
21  $soxId = $this->getEditObjectId();
22  if ( $soxId != '-1' && isset( $soxId)) {
23  // load object
24  $oDiscount = oxNew( 'oxdiscount' );
25  $oDiscount->load( $soxId );
26  $this->_aViewData['edit'] = $oDiscount;
27 
28  //disabling derived items
29  if ($oDiscount->isDerived())
30  $this->_aViewData['readonly'] = true;
31 
32  // generating category tree for artikel choose select list
33  $this->_createCategoryTree( "artcattree" );
34  }
35 
36  $iAoc = oxConfig::getParameter("aoc");
37  if ( $iAoc == 1 ) {
38  $oDiscountArticlesAjax = oxNew( 'discount_articles_ajax' );
39  $this->_aViewData['oxajax'] = $oDiscountArticlesAjax->getColumns();
40 
41  return "popups/discount_articles.tpl";
42  } elseif ( $iAoc == 2 ) {
43  $oDiscountCategoriesAjax = oxNew( 'discount_categories_ajax' );
44  $this->_aViewData['oxajax'] = $oDiscountCategoriesAjax->getColumns();
45 
46  return "popups/discount_categories.tpl";
47  }
48  return 'discount_articles.tpl';
49  }
50 }