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!