delivery_articles.php

Go to the documentation of this file.
00001 <?php
00002 
00003 
00004 
00005 
00012 class Delivery_Articles extends oxAdminDetails
00013 {
00020     public function render()
00021     {
00022         parent::render();
00023 
00024         $soxId = $this->getEditObjectId();
00025 
00026         if ( $soxId != "-1" && isset( $soxId)) {
00027             $this->_createCategoryTree( "artcattree");
00028 
00029             // load object
00030             $oDelivery = oxNew( "oxdelivery" );
00031             $oDelivery->load( $soxId);
00032             $this->_aViewData["edit"] =  $oDelivery;
00033 
00034             //Disable editing for derived articles
00035             if ($oDelivery->isDerived())
00036                $this->_aViewData['readonly'] = true;
00037         }
00038 
00039         $iAoc = oxConfig::getParameter("aoc");
00040         if ( $iAoc == 1 ) {
00041             $oDeliveryArticlesAjax = oxNew( 'delivery_articles_ajax' );
00042             $this->_aViewData['oxajax'] = $oDeliveryArticlesAjax->getColumns();
00043 
00044             return "popups/delivery_articles.tpl";
00045         } elseif ( $iAoc == 2 ) {
00046             $oDeliveryCategoriesAjax = oxNew( 'delivery_categories_ajax' );
00047             $this->_aViewData['oxajax'] = $oDeliveryCategoriesAjax->getColumns();
00048 
00049             return "popups/delivery_categories.tpl";
00050         }
00051 
00052         return "delivery_articles.tpl";
00053     }
00054 }