Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Edit/Update Account Doesn't Work after Adding a new Account Field

Edit/Update Account Doesn't Work after Adding a new Account Field

Locked

Views: 2,803

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
11 Nov 2006, 12:09 AM
#1
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Edit/Update Account Doesn't Work after Adding a new Account Field

I've been working on this problem all day (including searching around here for a couple of hours) and can't figure it out, so I'm throwing myself at your feet. Anyone's feet. "-)

Scenario

Modified TABLE_CUSTOMERS to add a Cell Phone Number Field. Per another thread here, followed Linda's guidelines for locating files and using "customers_fax" field as example for the new account field.

Works great... as long as all I am doing is "acting as a new customer creating an account" or editing an account via the Admin > Customers feature. BUT, if I try to edit the Account Info as the logged in customer, it's a no go.

General Info

-- New/Clean/From Scratch install of ZC 1.3.6 without any other modifications or plugins or contributions.

-- Compared my modified files to the original, unmodified files from the zip and there are no differences except the lines I added. I've proofread them at least 4 times... they are done correctly, at least if I squint just right. "-)

-- Added new field to db exactly as "customers_fax" was defined.

-- Running locally on Win XP Pro (also tested it on XP Home) using XAMPP 1.4.11, PHP 4.3.10 and MySQL 4.1.8. Also tested it on an older installation of XAMPP running PHP4.x and MySql (not sure of version). Same results across the board.

-- Have cleaned system and rebooted, checked file permissions, config files, etc. on the off chance I was missing something there... no change.

Catalog Side

db TABLE_CUSTOMERS is being written properly during account creation;
db TABLE_CUSTOMERS content is NOT being displayed in full during View/Edit My Acount -- only the info from the original fields is displayed; further, those are also the only fields I can update via the View/Edit My Account function, any change to the custom/new field is not written to the db.

Files modified (all using the Override system) = includes/modules/pages/account_edit/header_php.php, includes/modules/create_account.php, templates/tpl_account_edit_default.php, templates/tpl_modules_create_account.php, includes/languages/english.php

Admin Side

db TABLE_CUSTOMERS content is being displayed AND updated properly from the Admin area;

Files modified (no Override possible of course) = admin/customers.php, admin/includes/languages/english.php

Everywhere that "customers_fax" or "fax" or "$fax" appears I have copied and inserted the exact same statement for the new field. I simply cannot see why the account_edit process is not working on the Catalog side, I obviously have a mental block.

Am I missing a file somewhere? Or does someone have another idea as to what might be wrong? Could it possibly be something to do with the whole local server thing and sessions/cookies or ? The only thing I haven't done is installed to the hosting server to see if the problem is duplicated there.

Thanks!

Becky

12 Nov 2006, 4:42 PM
#2
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Re: Edit/Update Account Doesn't Work after Adding a new Account Field

Would it help anyone if I provided any of the above files?

Keeping fingers crossed someone might have an idea of what I'm overlooking.

Thanks!

Becky

12 Nov 2006, 6:55 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,623
Plugin Contributions:
0

Re: Edit/Update Account Doesn't Work after Adding a new Account Field

Becky-

Using the Developers Tool Kit in the admin, do a search for customers_fax and make sure you have added your changes to all of the files needed.

12 Nov 2006, 8:56 PM
#4
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Re: Edit/Update Account Doesn't Work after Adding a new Account Field

Kim:

Becky-

Using the Developers Tool Kit in the admin, do a search for customers_fax and make sure you have added your changes to all of the files needed.

Hi Kim,

Yep, did that several times - both before and after. In fact, that's how I got the initial list of files and sections that needed changes to begin with. In troubleshooting this, I've searched not only "customers_fax" but "fax" and "$fax". Overkill, you know. "-)

Actually did a print of the results and checked off each file/section as I did it to make sure I didn't overlook anything.

After making my changes and having this problem crop up, also did a search of my new field name and made sure that it was in each file/section that "customers_fax" was located and that there were no "speeling" errors. "-)

Anything else you can think of?

Thanks!

Becky

18 Apr 2007, 5:02 PM
#5
lindseyb avatar

lindseyb

New Zenner

Join Date:
Oct 2006
Posts:
7
Plugin Contributions:
0

Re: Edit/Update Account Doesn't Work after Adding a new Account Field

I am having the EXACT same problem, so I would love to hear anyone's feedback as to what might be happening. On my customer account edit page, the field shows up, but their info to edit it does not - it's just a blank field... please someone help!

19 Apr 2007, 3:51 AM
#6
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Re: Edit/Update Account Doesn't Work after Adding a new Account Field

LindseyB:

I am having the EXACT same problem, so I would love to hear anyone's feedback as to what might be happening. On my customer account edit page, the field shows up, but their info to edit it does not - it's just a blank field... please someone help!

I apologize for never posting here what the solution to my particular problem was -- I'll fix that right now! "-)

**The problem is/was one that many make when customizing "things" outside of the base template area -- creating an override directory where it is not recognized by the ZC system. **

In this case, I had created a "my_template" directory under modules/pages/account_edit. Because the override system doesn't work there, it wasn't picking up my modifications to "header_php.php" (a core file). It's not apparent during testing because the new fields display in the Account Edit screen (from the custom template version of tpl_account_edit.php).... but the data from the POST could not be processed because the original "header_php.php" (core file) did not contain instructions to do anything with that POST data. So it just gets ignored/lost/shot into space. "-)

[What's really bad about this is I KNEW better! :blush: Good lesson in not working 48 hour stretches without at least a short nap or some of Ajeh's coffee. hehe]

Repeating ZC Override Rule of Thumb: If there is not a "classic" folder in the directory where you are making a modification (for instance, under modules/page/[page_name]), you cannot use an override -- you are going to have to jump in and modify the core file! Be sure to save differentiated copies of both the original file(s) and the new file(s) so that you can "fall back" and/or not lose your changes during a future upgrade.

Hope this helps anyone else who runs into this problem!

Cheers,

Becky