but on live shop it duplicates the field.
Again - the activity of what causes this ?
1.) user attempts to create field name "test_1" of type "varchar" length "200" default "blah"
Try varchar 255. That's what I always do for string text (example: for customers email address).
2.) php code creates an entry in the customers_additional table with field_id 1, field_name "test_1" and field_status 1
Correct. That means - field_id + 1, field name: your field name, field_status: deactivated (set by default for testing purposes before actually putting this field live).
5.) php code creates an entry in the customers_additional table with field_id 2, field_name "test_1" and field_status 1
Can you actually see identical test_1 names under your TABLE_ADDITIONAL_CUSTOMERS + your TABLE_CUSTOMERS table in your phpmyadmin ? If so, how many ? There should only be one (unique) for a listed name and a physical name.
php code (successfully) alters table TABLE_CUSTOMERS to include the new test_1 field
Good to hear, at least, the import session is importing all your additional unlisted fields into the TABLE_ADDITIONAL_CUSTOMERS table as expected. As for your analysis, I think it's the best one I had so far. Now, all that is left is the three last posts I'm still expecting reports on the precise way (and detailed) the way that duplicated fields are happening. If you can confirm this one as well, I will look into it.
Now, which PHP, mySQL and Zen-Cart version are you using ?
the other bugs I've found are related to header information being re-sent after ZC has already sent them... not apparent to the front end, but it registers on the httpd logs:
[client <ip address>] PHP Warning: Cannot modify header information - headers already sent by (output started at <site_base>/zencart/admin/additional_customers_fields.php:25) in <site_base>/zencart/admin/includes/functions/general.php on line 34, referer: http://zencart.mydomain.com/admin/ad...stomers_fields
If you searched for it ... I find it hard to believe a little bit since it's everywhere in the first posts of this topic. This has already been issued that this is a zen_redirect problem, built by one of the DEV team, as I have posted a patch on one of the posts under this topic. Since then, no problems were reported. Just need to search a little bit further (even though it is understandable for the mount of replies involved on this topic).
[client <ip address>] PHP Warning: Cannot modify header information - headers already sent by (output started at <site_base>/zencart/admin/additional_customers_fields.php:25) in <site_base>/zencart/admin/includes/functions/general.php on line 34, referer: http://zencart.mydomain.com/admin/ad...stomers_fields
If you refresh the page when this message appears, what does it say on the top of the header page ?
I did exactly what i did on my test server, and works fine on test server, but on live shop it duplicates the field. I checked the create_account.php in \includes\modules\your_template\ multiple times to see what is wrong, but I can't figure out why it is doing that. Cause that file is untouched, so I just uploaded the file that you have created, plus I checked it with winmerge and there is little difference expect for the code that you put in. Guess for now I will mess around with it to see if I can fix both problems, or just wait till you have a fix.
The problem relies on my additional created functions actually - NOT on the modules. However, I'm still waiting for other reports regarding the duplicated fields. A patch (or upgrade version) will be released from that point.