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         $iAoc = oxConfig::getParameter("aoc");
00044         if ( $iAoc == 1 ) {            
00045             $oDeliverysetPaymentAjax = oxNew( 'deliveryset_payment_ajax' );
00046             $this->_aViewData['oxajax'] = $oDeliverysetPaymentAjax->getColumns();
00047 
00048             return "popups/deliveryset_payment.tpl";
00049         } elseif ( $iAoc == 2 ) {
00050             $oDeliverysetCountryAjax = oxNew( 'deliveryset_country_ajax' );
00051             $this->_aViewData['oxajax'] = $oDeliverysetCountryAjax->getColumns();
00052 
00053             return "popups/deliveryset_country.tpl";
00054         }
00055         return "deliveryset_payment.tpl";
00056     }
00057 }