Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default adding fields to order table

    I need to add a few fields to the orders table.

    customers_lastname
    and
    customers_firstname

    and make sure that it pulls this info from the customer table.

    right now it pulls customers_name and puts it together but i am working on an xml export that has to have first and last name separate

    Can someone help on this?

  2. #2
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: adding fields to order table

    ok i was able to add the two fields.

    Now how would i go about getting the data to populate on new orders now, dont really care about old orders.

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

    Default Re: adding fields to order table

    Do a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
    delivery_name
    billing_name
    customers_name

    This should give you an idea of where an existing field from the orders table is addressed ...

    NOTE: customers_name is used for other things, but look for the similarities between these ...
    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!

  4. #4
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: adding fields to order table

    This is the only thing i really found that looks close......

    /xxxxxx/includes/classes/order.php

    Line #138 : $this->delivery = array('name' => $order->fields['delivery_name'],

    Line #579 : 'delivery_name' => $this->delivery['firstname'] . ' ' . $this->delivery['lastname'],

    So would i add something like the following?

    $this->customer = array(
    'firstname' => $order->fields['customers_firstname'],
    'lastname' => $order->fields['customers_lastname'],

    and / or this ?

    $sql_data_array = array(
    'customers_firstname' => $this->customer['firstname'],

    'customers_lastname' => $this->customer['lastname'],

  5. #5
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: adding fields to order table

    OK got it working

    only add these two fields

    'customers_firstname' => $this->customer['firstname'],
    'customers_lastname' => $this->customer['lastname'],

    Under the following string

    $sql_data_array = array(

 

 

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 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
  3. Adding fields to Customers Table
    By chadderuski in forum General Questions
    Replies: 3
    Last Post: 14 Dec 2008, 12:45 PM
  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
  5. >_< Will it break Zencart? Adding fields to standard table..
    By dhermanus in forum General Questions
    Replies: 5
    Last Post: 14 Oct 2006, 10:43 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