# Protected Function erweitern - oxaddress.php \_getMergedAddressFields()

**URL:** <https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292>\
**Category:** Deutsches Forum\
**Tags:** development\
**Created:** [May 8, 2014, 3:18pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292 "2014-05-08T15:18:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![name123](https://forum.oxid-esales.com/letter_avatar_proxy/v4/letter/n/96bed5/32.png) [@name123](https://forum.oxid-esales.com/u/name123)\
**Post date:** [May 8, 2014, 3:18pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/1 "2014-05-08T15:18:27Z")

</div>

Hi,

wie kann ich die protected function \_getMergedAddressFields() in der /application/models/oxaddress.php erweitern?

Muss solch eine Änderung in ein Modul, oder kann ich es in einer TPL Datei, in meinem Fall in die /application/views/MeinTheme/tpl/form/fieldset/user\_shipping.tpl schreiben?

Die Function lautet derzeit wie folgt und der Fett-gedruckte Teil soll hinzugefügt werden:

```auto
    protected function _getMergedAddressFields()
    {
        $sDelAddress = '';
        $sDelAddress .= $this->oxaddress__oxcompany;
        $sDelAddress .= $this->oxaddress__oxfname;
        $sDelAddress .= $this->oxaddress__oxlname;
        $sDelAddress .= $this->oxaddress__oxstreet;
        $sDelAddress .= $this->oxaddress__oxstreetnr;
        $sDelAddress .= $this->oxaddress__oxaddinfo;
        $sDelAddress .= $this->oxaddress__oxcity;
        $sDelAddress .= $this->oxaddress__oxcountryid;
        $sDelAddress .= $this->oxaddress__oxstateid;
        $sDelAddress .= $this->oxaddress__oxzip;
        $sDelAddress .= $this->oxaddress__oxfon;
        $sDelAddress .= $this->oxaddress__oxfax;
        $sDelAddress .= $this->oxaddress__oxsal;
        [B]$sDelAddress .= $this->oxaddress__oxchange;[/B]

        return $sDelAddress;
    }

```

Edit: hat jemand eine Idee?

---

<div class="post-metadata">

**Author:** ![D3\_Data\_Development](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/d3_data_development/32/435_2.png) [@D3\_Data\_Development](https://forum.oxid-esales.com/u/D3_Data_Development)\
**Post date:** [July 17, 2014, 2:53pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/2 "2014-07-17T14:53:10Z")

</div>

Hi,

auch wenn die Antwort wohl schon “zu spät” ist:

Ja, solche Dinge macht man über Module. Das ist der übliche Weg, um Klassen und Funktionen in der Form zu verändern, wie du es vor hast.

---

<div class="post-metadata">

**Author:** ![name123](https://forum.oxid-esales.com/letter_avatar_proxy/v4/letter/n/96bed5/32.png) [@name123](https://forum.oxid-esales.com/u/name123)\
**Post date:** [July 17, 2014, 3:06pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/3 "2014-07-17T15:06:05Z")

</div>

Hi, danke für deine Rückmeldung.

Mein Vorhaben ist noch nicht in den Live-Betrieb gegangen, daher ist es noch nicht zu spät 🙂

Sobald es so weit ist schaue ich mir das näher an. Danke

---

<div class="post-metadata">

**Author:** ![alfred.bez](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/alfred.bez/32/767_2.png) [@alfred.bez](https://forum.oxid-esales.com/u/alfred.bez)\
**Post date:** [July 23, 2014, 12:22pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/4 "2014-07-23T12:22:08Z")

</div>

Moin,  
sieh mal, wie ich es in meinem Modul gelöst habe: [https://github.com/alfredbez/ab\_htmlmin/blob/master/models/ab\_htmlmin.php](https://github.com/alfredbez/ab_htmlmin/blob/master/models/ab_htmlmin.php)

---

<div class="post-metadata">

**Author:** ![name123](https://forum.oxid-esales.com/letter_avatar_proxy/v4/letter/n/96bed5/32.png) [@name123](https://forum.oxid-esales.com/u/name123)\
**Post date:** [August 1, 2014, 3:49pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/5 "2014-08-01T15:49:27Z")

</div>

Hi,  
danke für deinen Tipp. Bin schon ein ganzes Stück weitergekommen 🆒

Wie würdet Ihr bei folgendem Anliegen vorgehen:  
Es müssen über das Modul Änderungen in der user\_shipping.tpl vorgenommen werden. Also am Ende soll das Modul nur aktiviert werden und alles soll automatisch ablaufen und keine Blöcke müssen händisch eingefügt werden o. ä.

Da in dieser Datei nur ein Block ist und ich diesen Block nicht benötige und auch manuell nichts einfügen möchte, würde ich gerne, falls möglich, den kompletten Inhalt der Datei ersetzen.  
Ich habe es bereits auf diesem Weg versucht:  
[http://forum.oxid-esales.com/showthread.php?t=18260](http://forum.oxid-esales.com/showthread.php?t=18260)  
jedoch hat es nicht geklappt, bzw. wäre es auch viel zu aufwändig/umständlich, oder?

Stattdessen habe ich den Block der Datei user\_checkout\_change.tpl, der die user\_shipping.tpl lädt, so abgeändert, dass mein Template (in der metadata.php definiert) anstelle der user\_shipping.tpl geladen wird.

Würdet ihr das anders machen?

---

<div class="post-metadata">

**Author:** ![system](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/system/32/4245_2.png) [@system](https://forum.oxid-esales.com/u/system)\
**Post date:** [July 13, 2026, 8:22pm UTC](https://forum.oxid-esales.com/t/protected-function-erweitern-oxaddress-php--getmergedaddressfields/69292/6 "2026-07-13T20:22:24Z")

</div>

Closed on July 13, 2026, 8:22pm UTC


