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