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