Forums / Templates, Stylesheets, Page Layout / Adding field to account page

Adding field to account page

Locked

Views: 2,852

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
15 Jun 2006, 8:08 PM
#1
snapstore avatar

snapstore

New Zenner

Join Date:
Dec 2005
Posts:
6
Plugin Contributions:
0

Adding field to account page

I'm trying to find a good explanation on how to ADD a field to the account page. First of all I changed 'Company Name:' to 'Organization:' in my templates english.php file, hope that was okay. Now I would like to add the field 'Title' underneath it (preferably with a drop-down list of 5 or 6 titles) to choose form. Can anyboy give me advice on how to do this?

15 Jun 2006, 8:53 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding field to account page

Adding fields to one of the tables is best done by "following" a pattern of an existing field ...

The Customer information is actually made up of 3 tables:

customers 1 record
customers_info 1 record
address_book 1 to many records

You have to decide "where" or "what" does the information being collected belong to?

If it belongs to the Customer then add to the customers table or the customers_info table ... where customers table is easier to work with ...

If it belongs to the Address ... then add to the address_book ... and this is much more complicated ...

Assuming you want to add the Title to the customers table ... I would "follow" the customers_fax field as this is a field that is not "tested" for content ...

If, however, you need this to "follow" each Address ... then you'd add it to the address_book and follow the entry_suburb field as this is not tested for content either ...

Assuming you are adding this to the customers table ...

Go to the Admin ... Tools ... Developer's Tool Kit ...

In the bottom input box, type in customers_fax and select Catalog/Admin and click Search ...

This will show you everywhere this field is used "provided" it was referred to as customers_fax ...

I would also do a search on: fax

To make sure that all locations for this field in the Catalog and Admin are found ...

Next, you need to edit all files listed and add your new field:

customers_title

NOTE: if adding to the Address, then use:

entry_title

to keep in the same pattern as the other fields ...

NOTE: when editing the files ... if you can use the template and overrides do so ... this will avoid loosing your changes on an upgrade ...

Be sure to test all aspects of the Customer information for adding, editing etc. to assure that you are not breaking the code anywhere you are making changes ...

Hopefully this will give you a start on adding a new field and considering the kind of new field you wish to add and when to add to the customers table or the address_book ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Jun 2006, 8:42 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Adding field to account page

Somebody get a sticky!:thumbsup:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

29 Nov 2006, 3:32 PM
#4
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Adding field to account page

Yes, can we make this a sticky? I've been searching for this information for days and finally just found it here in this thread.

Thanks!

Ellie

Ellie Armsby