30 if ($soxId !=
"-1" && isset($soxId)) {
32 $oUser =
oxNew(
"oxuser");
37 $soxAddressId = isset($this->sSavedOxid) ? $this->sSavedOxid : $sAddressIdParameter;
38 if ($soxAddressId !=
"-1" && isset($soxAddressId)) {
39 $oAdress =
oxNew(
"oxaddress");
40 $oAdress->load($soxAddressId);
41 $this->_aViewData[
"edit"] = $oAdress;
44 $this->_aViewData[
"oxaddressid"] = $soxAddressId;
47 $oAddressList = $oUser->getUserAddresses();
48 foreach ($oAddressList as $oAddress) {
49 if ($oAddress->oxaddress__oxid->value == $soxAddressId) {
50 $oAddress->selected = 1;
55 $this->_aViewData[
"edituser"] = $oUser;
58 $oCountryList =
oxNew(
"oxCountryList");
61 $this->_aViewData[
"countrylist"] = $oCountryList;
64 $this->_aViewData[
'readonly'] =
true;
67 return "user_address.tpl";
79 $oAdress =
oxNew(
"oxaddress");
80 if (isset($aParams[
'oxaddress__oxid']) && $aParams[
'oxaddress__oxid'] ==
"-1") {
81 $aParams[
'oxaddress__oxid'] = null;
83 $oAdress->load($aParams[
'oxaddress__oxid']);
86 $oAdress->assign($aParams);
89 $this->sSavedOxid = $oAdress->getId();
98 $this->_blDelete =
false;
101 if (isset($aParams[
'oxaddress__oxid']) && $aParams[
'oxaddress__oxid'] !=
"-1") {
102 $oAdress =
oxNew(
"oxaddress");
103 $this->_blDelete = $oAdress->delete($aParams[
'oxaddress__oxid']);