29 if ( $soxId !=
"-1" && isset( $soxId)) {
31 $oUser =
oxNew(
"oxuser" );
32 $oUser->load( $soxId);
36 if ( $soxAddressId !=
"-1" && isset( $soxAddressId ) ) {
37 $oAdress =
oxNew(
"oxaddress" );
38 $oAdress->load( $soxAddressId );
39 $this->_aViewData[
"edit"] = $oAdress;
42 $this->_aViewData[
"oxaddressid"] = $soxAddressId;
45 $oAddressList = $oUser->getUserAddresses();
46 foreach ( $oAddressList as $oAddress ) {
47 if ( $oAddress->oxaddress__oxid->value == $soxAddressId ) {
48 $oAddress->selected = 1;
53 $this->_aViewData[
"edituser"] = $oUser;
56 $oCountryList =
oxNew(
"oxCountryList" );
59 $this->_aViewData[
"countrylist"] = $oCountryList;
62 $this->_aViewData[
'readonly'] =
true;
64 return "user_address.tpl";
78 $oAdress =
oxNew(
"oxaddress" );
79 if ( isset( $aParams[
'oxaddress__oxid'] ) && $aParams[
'oxaddress__oxid'] ==
"-1" ) {
80 $aParams[
'oxaddress__oxid'] = null;
82 $oAdress->load( $aParams[
'oxaddress__oxid'] );
85 $oAdress->assign( $aParams );
88 $this->sSavedOxid = $oAdress->getId();
99 $this->_blDelete =
false;
102 if ( isset( $aParams[
'oxaddress__oxid'] ) && $aParams[
'oxaddress__oxid'] !=
"-1" ) {
103 $oAdress =
oxNew(
"oxaddress" );
104 $this->_blDelete = $oAdress->delete( $aParams[
'oxaddress__oxid'] );