---
title: "sr_feuser_registration und tt_products: Anrede übernehmen"
url: "https://www.typo3.net/d/71205-sr-feuser-registration-und-tt-products-anrede-uebernehmen"
source: "typo3.net"
tags: ["Extensions","Frage","Frontend-Benutzer"]
created: "2007-12-04"
last_reply: "2008-01-29"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# sr_feuser_registration und tt_products: Anrede übernehmen

Extensions · 1 Antwort · gestartet 2007-12-04

## Eröffnungsbeitrag

**kwottkam** · 2007-12-04 · [Beitrag #1](https://www.typo3.net/d/71205-sr-feuser-registration-und-tt-products-anrede-uebernehmen/1)

Hallo,

bei mir wird die Anrede aus sr_feuser_registration (Feld gender) nicht in das Bestellformular von tt_products (PERSON_SALUTATION).

Gibt's da einen Trick oder mache ich was falsch?

Ich finde in der class.tx_ttproducts_info.php auch keine Stelle, wo das Feld gender aus feuser gelesen wird.

Gruß KLAUS

## Antworten

### [#2](https://www.typo3.net/d/71205-sr-feuser-registration-und-tt-products-anrede-uebernehmen/2) · kwottkam · 2008-01-29

Hallo zusammen,

ich habe das Problem gelöst, indem ich am Code ein kleine Änderung durchgeführt habe. Ist natürlich nicht das beste, aber für mich brauchbar.

Datei class..tx_ttproducts_info.php

```php
foreach ($fieldArray as $k => $field)	{
	$this->infoArray['billing'][$field] = ($this->infoArray['billing'][$field] ? $this->infoArray['billing'][$field]: $TSFE->fe_user->user[$field]);
}
//Klaus Wottka-Märkl
$this->infoArray['billing']['salutation'] = ($this->infoArray['billing']['salutation'] ? $this->infoArray['billing']['salutation']: $TSFE->fe_user->user['gender']);
$this->infoArray['delivery']['salutation'] = ($this->infoArray['delivery']['salutation'] ? $this->infoArray['delivery']['salutation']: $TSFE->fe_user->user['gender']);
```

Problem lag meiner Erkenntnis daran, dass die Anrede in tt_products "Salutation" heißt, in feuser_registration aber "gender". Damit wird beim durchlaufen der foreach Schleife salutation immer auf NULL gesetzt.

Außerdem hatte ich noch das Problem, dass der Marker ###DELIVERY_SALUTATION### mir immer ein Select Feld mit Namen recs[deliveryinfo][salutaion] erzeugt hat. Kommt wohl aus der Historie..?

Gelöst für mich mit:

```php
//Klaus Wottka-Märkl if Hinzugefügt, weil delivery OHNE info gesetzt werden muss
if ($type == "delivery")
	$typeSalutationText = tx_ttproducts_form_div::createSelect ($this->pibase, $TCA['sys_products_orders']['columns']['salutation']['config']['items'], 'recs['.$type.'][salutation]', $row['salutation'], array());
else
	$typeSalutationText = tx_ttproducts_form_div::createSelect ($this->pibase, $TCA['sys_products_orders']['columns']['salutation']['config']['items'], 'recs['.$type.'info][salutation]', $row['salutation'], array());
```

---

Quelle: „sr_feuser_registration und tt_products: Anrede übernehmen“, typo3.net, https://www.typo3.net/d/71205-sr-feuser-registration-und-tt-products-anrede-uebernehmen
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
