Problem with custom user account fields
Posted: Fri Dec 28, 2012 4:20 am
Hello!
I needed to create 5 additional fields for user, so I decided to add them after "company" field.
I edited files in catalog/controller, catalog/model and catalog/view for front-end of the site and
admin/controller, admin/model and admin/view for back-end of the site
I also added new columns in "address" table of database.
Since these new fields were pretty much the same as "company" field, 1 line of text and not mandatory, I used "company" fields code as a guide to create my other fields.
At the moment everything is almost fine, I'm experiencing 1 problem, which I don't know how to fix or why is it present.
When I register account from front-end, I see all the new fields I can fill them with no problem, after registering an account information from these fields gets written to database. I can also edit/change these fields and this information will get updated in database. Everything is great when working from font-end.
Problems start with back-end. When I try to view user account "address" tab (where company field and my new fields are located) from administration panel. For some reason address information is displayed from another account, although in front-end right address information (including my custom fields) is displayed.
I also tried creating account from administration panel, in this case I can also fill my custom fields with no problem, and information from these fields also gets written to database. I can even view "address" information in front-end.
I'm using oc 1.5.1.3
I needed to create 5 additional fields for user, so I decided to add them after "company" field.
I edited files in catalog/controller, catalog/model and catalog/view for front-end of the site and
admin/controller, admin/model and admin/view for back-end of the site
I also added new columns in "address" table of database.
Since these new fields were pretty much the same as "company" field, 1 line of text and not mandatory, I used "company" fields code as a guide to create my other fields.
At the moment everything is almost fine, I'm experiencing 1 problem, which I don't know how to fix or why is it present.
When I register account from front-end, I see all the new fields I can fill them with no problem, after registering an account information from these fields gets written to database. I can also edit/change these fields and this information will get updated in database. Everything is great when working from font-end.
Problems start with back-end. When I try to view user account "address" tab (where company field and my new fields are located) from administration panel. For some reason address information is displayed from another account, although in front-end right address information (including my custom fields) is displayed.
I also tried creating account from administration panel, in this case I can also fill my custom fields with no problem, and information from these fields also gets written to database. I can even view "address" information in front-end.
I'm using oc 1.5.1.3