discount_articles.php

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