Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    7
    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?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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!

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,683
    Plugin Contributions
    11

    Default Re: Adding field to account page

    Somebody get a sticky!
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    454
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. v151 Adding new mandatory field in account creation
    By ejunk in forum Managing Customers and Orders
    Replies: 1
    Last Post: 3 Jan 2013, 10:30 PM
  2. Adding Additional Field Account Edit Page
    By jaredt112 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Apr 2010, 05:49 AM
  3. Adding a Custom field to the "My Account Page"
    By kudrow in forum Managing Customers and Orders
    Replies: 3
    Last Post: 21 Apr 2009, 03:39 PM
  4. Edit/Update Account Doesn't Work after Adding a new Account Field
    By webomat in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 19 Apr 2007, 04:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg