deliveryset_payment.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class DeliverySet_Payment extends oxAdminDetails
00010 {
00017     public function render()
00018     {
00019         parent::render();
00020 
00021         $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
00022         if ( $soxId != "-1" && isset( $soxId)) {
00023             // load object
00024             $odeliveryset = oxNew( "oxdeliveryset" );
00025             $odeliveryset->setLanguage($this->_iEditLang);
00026             $odeliveryset->load( $soxId);
00027 
00028             $oOtherLang = $odeliveryset->getAvailableInLangs();
00029 
00030             if (!isset($oOtherLang[$this->_iEditLang])) {
00031                 // echo "language entry doesn't exist! using: ".key($oOtherLang);
00032                 $odeliveryset->setLanguage(key($oOtherLang));
00033                 $odeliveryset->load( $soxId );
00034             }
00035 
00036             $this->_aViewData["edit"] =  $odeliveryset;
00037 
00038             //Disable editing for derived articles
00039             if ($odeliveryset->isDerived())
00040                 $this->_aViewData['readonly'] = true;
00041         }
00042 
00043         $aColumns = array();
00044         $iAoc = oxConfig::getParameter("aoc");
00045         if ( $iAoc == 1 ) {
00046 
00047             include_once 'inc/deliveryset_payment.inc.php';
00048             $this->_aViewData['oxajax'] = $aColumns;
00049 
00050             return "popups/deliveryset_payment.tpl";
00051         } elseif ( $iAoc == 2 ) {
00052 
00053             include_once 'inc/deliveryset_country.inc.php';
00054             $this->_aViewData['oxajax'] = $aColumns;
00055 
00056             return "popups/deliveryset_country.tpl";
00057         }
00058         return "deliveryset_payment.tpl";
00059     }
00060 }