delivery_articles.php

Go to the documentation of this file.
00001 <?php
00002 
00003 
00010 class Delivery_Articles extends oxAdminDetails
00011 {
00012 
00019     public function render()
00020     {
00021         parent::render();
00022 
00023         $soxId = $this->getEditObjectId();
00024 
00025         if ($soxId != "-1" && isset($soxId)) {
00026             $this->_createCategoryTree("artcattree");
00027 
00028             // load object
00029             $oDelivery = oxNew("oxdelivery");
00030             $oDelivery->load($soxId);
00031             $this->_aViewData["edit"] = $oDelivery;
00032 
00033             //Disable editing for derived articles
00034             if ($oDelivery->isDerived()) {
00035                 $this->_aViewData['readonly'] = true;
00036             }
00037         }
00038 
00039         $iAoc = oxRegistry::getConfig()->getRequestParameter("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 }