OXID eShop CE  4.8.10
 All Classes Files Functions Variables Pages
deliveryset_payment.php
Go to the documentation of this file.
1 <?php
2 
10 {
17  public function render()
18  {
20 
21  $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
22  if ( $soxId != "-1" && isset( $soxId)) {
23  // load object
24  $odeliveryset = oxNew( "oxdeliveryset" );
25  $odeliveryset->setLanguage($this->_iEditLang);
26  $odeliveryset->load( $soxId);
27 
28  $oOtherLang = $odeliveryset->getAvailableInLangs();
29 
30  if (!isset($oOtherLang[$this->_iEditLang])) {
31  // echo "language entry doesn't exist! using: ".key($oOtherLang);
32  $odeliveryset->setLanguage(key($oOtherLang));
33  $odeliveryset->load( $soxId );
34  }
35 
36  $this->_aViewData["edit"] = $odeliveryset;
37 
38  //Disable editing for derived articles
39  if ($odeliveryset->isDerived())
40  $this->_aViewData['readonly'] = true;
41  }
42 
43  $iAoc = oxConfig::getParameter("aoc");
44  if ( $iAoc == 1 ) {
45  $oDeliverysetPaymentAjax = oxNew( 'deliveryset_payment_ajax' );
46  $this->_aViewData['oxajax'] = $oDeliverysetPaymentAjax->getColumns();
47 
48  return "popups/deliveryset_payment.tpl";
49  } elseif ( $iAoc == 2 ) {
50  $oDeliverysetCountryAjax = oxNew( 'deliveryset_country_ajax' );
51  $this->_aViewData['oxajax'] = $oDeliverysetCountryAjax->getColumns();
52 
53  return "popups/deliveryset_country.tpl";
54  }
55  return "deliveryset_payment.tpl";
56  }
57 }