Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Adding fields to Customers Table

    I have added a new field to the CUSTOMERS table so I can add their company account number from our main system to their online account profile.

    I am able to edit and save the new field while editing the customer's info from within the admin. This is fine, and preferable.

    What I need now is to load this field so that I can add it to e-mails and orders.

    It looks like this customer info is loaded in login.php ... it that correct, or is there some other location I need to use?

    Some direction would be very helpful! Thank you!

    -chaddro

  2. #2
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Adding fields to Customers Table

    I have managed to solve this myself I believe.

    I edited the 'includes/modules/pages/login/header_php.php' and added the
    field to the database query, and added it to the $_SESSION[] variables.

    This way I can access the variable with $_SESSION['customers_acct_no'] anywhere I need it (namely checkout and e-mails).

    Not so hard after all!

  3. #3
    Join Date
    Sep 2007
    Location
    Vancouver, CA
    Posts
    94
    Plugin Contributions
    0

    Default Re: Adding fields to Customers Table

    Hi, I found your thread while trying to do something like you.

    I think I missed a simple part of your process:

    I added a field to the customers table as well, but it doesn't show up for me in admin. When I click on any of the customers... no luck. The field isn't there.

    What am I missing?

    Thanks!

  4. #4
    Join Date
    Oct 2008
    Posts
    48
    Plugin Contributions
    0

    Default Re: Adding fields to Customers Table

    bifficus did you find an answer... I have the same problem
    Tharina

 

 

Similar Threads

  1. Adding unit_cost fields to orders_products table
    By TraderDan in forum General Questions
    Replies: 3
    Last Post: 30 Jul 2010, 08:04 PM
  2. adding fields to order table
    By d1rage5 in forum Managing Customers and Orders
    Replies: 4
    Last Post: 7 Oct 2009, 07:50 PM
  3. adding of some new fields in order table
    By ajaysingh in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Sep 2009, 09:43 AM
  4. adding extra fields to shop_products table
    By [email protected] in forum Customization from the Admin
    Replies: 1
    Last Post: 17 Nov 2006, 03:16 PM

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