discount_articles.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class Discount_Articles extends oxAdminDetails
00010 {
00011 
00018     public function render()
00019     {
00020         parent::render();
00021 
00022         $soxId = $this->getEditObjectId();
00023         if ($soxId != '-1' && isset($soxId)) {
00024             // load object
00025             $oDiscount = oxNew('oxdiscount');
00026             $oDiscount->load($soxId);
00027             $this->_aViewData['edit'] = $oDiscount;
00028 
00029             //disabling derived items
00030             if ($oDiscount->isDerived()) {
00031                 $this->_aViewData['readonly'] = true;
00032             }
00033 
00034             // generating category tree for artikel choose select list
00035             $this->_createCategoryTree("artcattree");
00036         }
00037 
00038         $iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
00039         if ($iAoc == 1) {
00040             $oDiscountArticlesAjax = oxNew('discount_articles_ajax');
00041             $this->_aViewData['oxajax'] = $oDiscountArticlesAjax->getColumns();
00042 
00043             return "popups/discount_articles.tpl";
00044         } elseif ($iAoc == 2) {
00045             $oDiscountCategoriesAjax = oxNew('discount_categories_ajax');
00046             $this->_aViewData['oxajax'] = $oDiscountCategoriesAjax->getColumns();
00047 
00048             return "popups/discount_categories.tpl";
00049         }
00050 
00051         return 'discount_articles.tpl';
00052     }
00053 }