28 unset($this->_aViewData[
"sumtype"][2]);
31 $oGroups =
oxNew(
"oxlist");
32 $oGroups->init(
"oxgroups");
33 $oGroups->selectString(
"select * from " . getViewName(
"oxgroups", $this->_iEditLang));
36 if ($soxId !=
"-1" && isset($soxId)) {
38 $oPayment =
oxNew(
"oxpayment");
39 $oPayment->loadInLang($this->_iEditLang, $soxId);
41 $oOtherLang = $oPayment->getAvailableInLangs();
42 if (!isset($oOtherLang[$this->_iEditLang])) {
44 $oPayment->loadInLang(key($oOtherLang), $soxId);
46 $this->_aViewData[
"edit"] = $oPayment;
51 $this->_aViewData[
"posslang"] =
$aLang;
54 foreach ($oOtherLang as $id => $language) {
55 $oLang =
new stdClass();
56 $oLang->sLangDesc = $language;
58 $this->_aViewData[
"otherlang"][$id] = clone $oLang;
62 $this->_aViewData[
'aFieldNames'] =
oxRegistry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value);
66 $oPaymentMainAjax =
oxNew(
'payment_main_ajax');
67 $this->_aViewData[
'oxajax'] = $oPaymentMainAjax->getColumns();
69 return "popups/payment_main.tpl";
72 $this->_aViewData[
"editor"] = $this->
_generateTextEditor(
"100%", 300, $oPayment,
"oxpayments__oxlongdesc");
74 return "payment_main.tpl";
90 if (!isset($aParams[
'oxpayments__oxactive'])) {
91 $aParams[
'oxpayments__oxactive'] = 0;
93 if (!isset($aParams[
'oxpayments__oxchecked'])) {
94 $aParams[
'oxpayments__oxchecked'] = 0;
97 $oPayment =
oxNew(
"oxpayment");
100 $oPayment->loadInLang($this->_iEditLang, $soxId);
102 $aParams[
'oxpayments__oxid'] = null;
106 $oPayment->setLanguage(0);
107 $oPayment->assign($aParams);
112 if (empty($aRules)) {
113 $this->_aViewData[
"noticeoxaddsumrules"] = 1;
115 $oPayment->oxpayments__oxaddsumrules =
new oxField(array_sum($aRules));
119 if (!is_array($this->_aFieldArray)) {
120 $this->_aFieldArray =
oxRegistry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value);
125 foreach ($this->_aFieldArray as $oField) {
126 $sValdesc .= $oField->name .
"__@@";
130 $oPayment->setLanguage($this->_iEditLang);
150 $aParams[
'oxpayments__oxshopid'] = $sShopID;
151 $oObj =
oxNew(
"oxpayment");
153 if ($soxId !=
"-1") {
154 $oObj->loadInLang($this->_iEditLang, $soxId);
156 $aParams[
'oxpayments__oxid'] = null;
160 $oObj->setLanguage(0);
161 $oObj->assign($aParams);
179 $oPayment =
oxNew(
"oxpayment");
180 if ($oPayment->loadInLang($this->_iEditLang, $this->getEditObjectId())) {
183 $this->_aFieldArray =
oxRegistry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value);
185 if (is_array($aDelFields) && count($aDelFields)) {
186 foreach ($aDelFields as $sDelField) {
187 foreach ($this->_aFieldArray as $sKey => $oField) {
188 if ($oField->name == $sDelField) {
189 unset($this->_aFieldArray[$sKey]);
207 $oPayment =
oxNew(
"oxpayment");
208 if ($oPayment->loadInLang($this->_iEditLang, $this->getEditObjectId())) {
210 $this->_aFieldArray =
oxRegistry::getUtils()->assignValuesFromText($oPayment->oxpayments__oxvaldesc->value);
212 $oField =
new stdClass();
215 $this->_aFieldArray[] = $oField;