63 $this->_aViewData[
"oxpaymentid"] = $this->
getPaymentId();
65 $this->_aViewData[
"edituser"] = $this->
getUser();
70 $this->_aViewData[
'readonly'] =
true;
74 return "user_payment.tpl";
90 if (isset($aDynvalues)) {
95 if ($aParams[
'oxuserpayments__oxid'] ==
"-1") {
96 $aParams[
'oxuserpayments__oxid'] = null;
99 $oAdress =
oxNew(
"oxuserpayment");
100 $oAdress->assign($aParams);
113 if ($aParams[
'oxuserpayments__oxid'] !=
"-1") {
114 $oAdress =
oxNew(
"oxuserpayment");
115 if ($oAdress->load($aParams[
'oxuserpayments__oxid'])) {
116 $this->_blDelete = ( bool ) $oAdress->delete();
129 if ($this->_oActiveUser == null) {
130 $this->_oActiveUser =
false;
132 if ($sOxId !=
"-1" && isset($sOxId)) {
134 $this->_oActiveUser =
oxNew(
"oxuser");
135 $this->_oActiveUser->load($sOxId);
149 if ($this->_sPaymentId == null) {
151 if (!$this->_sPaymentId || $this->_blDelete) {
152 if ($oUser = $this->
getUser()) {
153 $oUserPayments = $oUser->getUserPayments();
154 if (isset($oUserPayments[0])) {
155 $this->_sPaymentId = $oUserPayments[0]->oxuserpayments__oxid->value;
159 if (!$this->_sPaymentId) {
160 $this->_sPaymentId =
"-1";
174 if ($this->_oPaymentTypes == null) {
177 $this->_oPaymentTypes =
oxNew(
"oxlist");
178 $this->_oPaymentTypes->init(
"oxpayment");
179 $oListObject = $this->_oPaymentTypes->getBaseObject();
181 $this->_oPaymentTypes->getList();
194 if ($this->_oUserPayment == null) {
195 $this->_oUserPayment =
false;
197 if ($sPaymentId !=
"-1" && isset($sPaymentId)) {
198 $this->_oUserPayment =
oxNew(
"oxuserpayment");
199 $this->_oUserPayment->load($sPaymentId);
200 $sTemplate = $this->_oUserPayment->oxuserpayments__oxvalue->value;
204 foreach ($oPaymentTypes as $oPayment) {
205 if ($oPayment->oxpayments__oxid->value == $this->_oUserPayment->oxuserpayments__oxpaymentsid->value) {
206 $oPayment->selected = 1;
209 $sTemplate = $oPayment->oxpayments__oxvaldesc->value;
228 if ($this->_oUserPayments == null) {
229 $this->_oUserPayments =
false;
230 if ($oUser = $this->
getUser()) {
233 $this->_oUserPayments = $oUser->getUserPayments();
235 foreach ($this->_oUserPayments as $oUserPayment) {
236 $oPayment =
oxNew(
'oxpayment');
237 $oPayment->setLanguage($sTplLang);
238 $oPayment->load($oUserPayment->oxuserpayments__oxpaymentsid->value);
239 $oUserPayment->oxpayments__oxdesc = clone $oPayment->oxpayments__oxdesc;
240 if ($oUserPayment->oxuserpayments__oxid->value == $sPaymentId) {
241 $oUserPayment->selected = 1;