---
title: "useStaticInfoCountry speichert falschen country_code Code (cn_iso_3) nach fe_users: static_info_country"
url: "https://www.typo3.net/d/98137-usestaticinfocountry-speichert-falschen-country-code-code-cn-iso-3-nach-fe-users-static-info-country"
source: "typo3.net"
tags: ["Extensions","Frage","TYPO3 4"]
created: "2010-04-11"
last_reply: "2010-05-04"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# useStaticInfoCountry speichert falschen country_code Code (cn_iso_3) nach fe_users: static_info_country

Extensions · 1 Antwort · gestartet 2010-04-11

## Eröffnungsbeitrag

**Robman** · 2010-04-11 · [Beitrag #1](https://www.typo3.net/d/98137-usestaticinfocountry-speichert-falschen-country-code-code-cn-iso-3-nach-fe-users-static-info-country/1)

Hallo alle zusammen!

# DAS PROBLEM
Beim Anlegen eines neuen Users wird ein falscher Wert in die
Tabelle: fe_users / Spalte: static_info_country
geschrieben.

Anstatt des richtigen cn_iso_3 Codes für diese Spalte,

z.B. " **DEU** " oder " **AUT** ",
wird " **Deu** " oder " **Aut** "

eingetragen. Keine Ahnung wo das herkommt oder warum das passiert?!
Der Wert aus dem Select-Feld ist richtig und wird bis vor der endgültigen Speicherung richtig übergeben:

<select size="1" name="recs[personinfo][country_code]">
<option value="DEU" selected="selected">Deutschland</option>
</select>

Beim Finalisieren dann aber falsch gespeichert...

# Installation
Typo3 4.3.2
tt_products 2.6.2
table 0.1.33
div2007 0.2.5
static_info_tables 2.1.2
static_info_tables_de 2.0.2

Bei Eingabe der Rechnungs- und Lieferdaten verwende ich die Marker: ###PERSON_COUNTRY_CODE### und ###DELIVERY_COUNTRY_CODE### um mir das Land-Select-Feld anzeigen zu lassen. Geht auch gut.

```typoscript
plugin.tt_products {
  useStaticInfoCountry = 1
  memberOfGroup = 2
  createUsers = 1
  loginUserInfoAddress = 1
  editLockedLoginInfo = 1
  lockLoginUserInfo = 1
}
```

Das Speichern neuer User klappt. Nur eben der Ländercode wird falsch gespeichert. Hoffe ihr könnt weiterhelfen.

Mit freundlichen Grüßen,

Robman

## Antworten

### [#2](https://www.typo3.net/d/98137-usestaticinfocountry-speichert-falschen-country-code-code-cn-iso-3-nach-fe-users-static-info-country/2) · Robman · 2010-05-04

Das Problem hat sich dank "Franz Holzinger" gelöst. Folgendes muss geändert werden:

```php
--- control/class.tx_ttproducts_activity_finalize.php (révision 27663)
+++ control/class.tx_ttproducts_activity_finalize.php (copie de travail)
@@ -146,8 +146,10 @@
}
}

- $countryKey = ($this->conf['useStaticInfoCountry'] ? 'static_info_country' : 'country');
- $insertFields[$countryKey] = $address->infoArray['billing']['country'];
+ if ($this->conf['useStaticInfoCountry']) {
+ $insertFields['static_info_country'] = $address->infoArray['billing']['country_code'];
+ }
+
if($address->infoArray['billing']['date_of_birth']) {
$date = str_replace ('-', '/', $address->infoArray['billing']['date_of_birth']);
$insertFields['date_of_birth'] = strtotime($date);
```

Hoffe das es anderen auch helfen wird.

Gruß,

Robman

---

Quelle: „useStaticInfoCountry speichert falschen country_code Code (cn_iso_3) nach fe_users: static_info_country“, typo3.net, https://www.typo3.net/d/98137-usestaticinfocountry-speichert-falschen-country-code-code-cn-iso-3-nach-fe-users-static-info-country
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
