deliveryset_payment.php

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