How to config aimeos plugin to work with country code iso alpha 2 only?
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
How to config aimeos plugin to work with country code iso alpha 2 only?
Aimeos profile billing address (address-payment-countryid) has been saved to the field fe_users.static_info_country as
iso alpha 3 (AND) but needed as iso alpha 2 (AD). How to make it happen?
<select class="form-control" id="address-payment-countryid" name="ai[address][payment][customer.countryid]">
<option value="">Bitte wählen</option>
<option value="AD">
Andorra</option>
<option value="AE">
Vereinigte Arabische Emirate</option>
<option value="AI">
Anguilla</option><option value="AF">
Afghanistan</option>
<option value="AG">
Antigua und Barbuda</option>
this behavior is hardcoded in ai-typo3/lib/custom/config/mshop/customer.php
'update' => array(
'ansi' => '
UPDATE "fe_users"
SET :names
"name" = ?, "username" = ?, "gender" = ?, "company" = ?, "vatid" = ?, "title" = ?,
"first_name" = ?, "last_name" = ?, "address" = ?, "zip" = ?, "city" = ?, "zone" = ?,
"language" = ?, "telephone" = ?, "email" = ?, "fax" = ?, "www" = ?, "longitude" = ?,
"latitude" = ?, "date_of_birth" = ?, "disable" = ?, "password" = ?, "tstamp" = ?,
cry: ???? "static_info_country"=( SELECT "cn_iso_3" FROM "static_countries" WHERE "cn_iso_2" = ? LIMIT 1 ),
"usergroup" = ?, "pid" = ?
WHERE ( siteid = ? OR siteid = \'\' ) AND "uid" = ?
',
),
iso alpha 3 (AND) but needed as iso alpha 2 (AD). How to make it happen?
<select class="form-control" id="address-payment-countryid" name="ai[address][payment][customer.countryid]">
<option value="">Bitte wählen</option>
<option value="AD">
Andorra</option>
<option value="AE">
Vereinigte Arabische Emirate</option>
<option value="AI">
Anguilla</option><option value="AF">
Afghanistan</option>
<option value="AG">
Antigua und Barbuda</option>
this behavior is hardcoded in ai-typo3/lib/custom/config/mshop/customer.php
'update' => array(
'ansi' => '
UPDATE "fe_users"
SET :names
"name" = ?, "username" = ?, "gender" = ?, "company" = ?, "vatid" = ?, "title" = ?,
"first_name" = ?, "last_name" = ?, "address" = ?, "zip" = ?, "city" = ?, "zone" = ?,
"language" = ?, "telephone" = ?, "email" = ?, "fax" = ?, "www" = ?, "longitude" = ?,
"latitude" = ?, "date_of_birth" = ?, "disable" = ?, "password" = ?, "tstamp" = ?,
cry: ???? "static_info_country"=( SELECT "cn_iso_3" FROM "static_countries" WHERE "cn_iso_2" = ? LIMIT 1 ),
"usergroup" = ?, "pid" = ?
WHERE ( siteid = ? OR siteid = \'\' ) AND "uid" = ?
',
),
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
Yes, Aimeos use two letter ISO country codes everywhere and maps the three letter country codes using the static_info_country table. What is your exact request now?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
Aimeos plugin uses two-letter ISO country codes but saves in the fe_user table the 3 letters code. This is the problem. The other plugins use the same field in fe_user (with 2 letters) and I got the clash.
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
Then, the other plugin you are using does it wrong because the fe_users.static_info_country column is VARCHAR(3) for three letter ISO country codes. Which extension does this?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
literally all. for example sf_register. All plugins use 2 letter code due to existed localization. What the reason to perform transitions many times only to save 3 letters code? Why the aimeos profile plugin do it only for the billing address but for delivery address save in 2 letters code?
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
Which else? If there are more extensions saving a 2 letter code than 3 three letter code, then we should switch too.
You can adapt the SQL statements to read/write the 2 letter codes directly:
https://github.com/aimeos/ai-typo3/blob ... #L603-L709
You can adapt the SQL statements to read/write the 2 letter codes directly:
https://github.com/aimeos/ai-typo3/blob ... #L603-L709
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to config aimeos plugin to work with country code iso alpha 2 only?
ok. The "brotkrueml/form-country-select". This plugin is actively used in typo3 core form framework https://docs.typo3.org/p/brotkrueml/for ... ter/en-us/.
In my opinion, it must be a configurable value, and anyway you must use the same country code for all entities (not like now with billing and delivery addresses).
And thank you for your hard work ))
In my opinion, it must be a configurable value, and anyway you must use the same country code for all entities (not like now with billing and delivery addresses).
And thank you for your hard work ))
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic