Zen Cart Logo
Forums / Managing Customers and Orders / Pulling Info From Customers Table On an Order

Pulling Info From Customers Table On an Order

Locked

Views: 1,430

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
22 Apr 2008, 1:53 AM
#1
cyberwoolf avatar

cyberwoolf

Zen Follower

Join Date:
Oct 2005
Posts:
97
Plugin Contributions:
0

Pulling Info From Customers Table On an Order

Hey Guys,

I've added a Tax ID field to my registration. I can get the tax ID to come up when I view the orders in the admin. But the problem I am running in to is how do I pull the customers tax ID from the customers table (called and insert it into the orders table when the user checks out?

I have made fields in both the customers table (called customers_taxid in both tables) and the orders table. I just can't figure out how to bring it over on checkout.

22 Apr 2008, 5:26 AM
#2
wolfsz avatar

wolfsz

Zen Follower

Join Date:
Mar 2006
Location:
Australia
Posts:
286
Plugin Contributions:
3

Re: Pulling Info From Customers Table On an Order

Hi there
Before you start doing programming, is it possible to use one of the existing fields instead? Eg 2nd Address line or any other field you have switched off, since it is much easier to rename a field then to insert new ones.

22 Apr 2008, 6:03 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Pulling Info From Customers Table On an Order

But the problem I am running in to is how do I pull the customers tax ID from the customers table
You will be more successful if you determine an existing call that is present on all transactions like customer name. Search for all the files where this happens and make a list.

Find the php/mysql call that gets this and code yours similary. Insert it into all the files in your list in the correct locations.

22 Apr 2008, 6:22 AM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: Pulling Info From Customers Table On an Order

CyberWoolf:

Hey Guys,

I've added a Tax ID field to my registration. I can get the tax ID to come up when I view the orders in the admin. But the problem I am running in to is how do I pull the customers tax ID from the customers table (called and insert it into the orders table when the user checks out?

I have made fields in both the customers table (called customers_taxid in both tables) and the orders table. I just can't figure out how to bring it over on checkout.

C,
I created a wholesale site 1 year ago

  1. I created a new field called: Tax ID Number
  2. I cloned Telephone Number
  3. If I recall I edited 24 files
  4. I will get out my notes for you and find the file to edit the order and code..
  5. I checked my wholesale site on a new order and the Customer Tax ID Number is present
  6. Is this what you mean????
22 Apr 2008, 6:50 AM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: Pulling Info From Customers Table On an Order

CyberWoolf:

Hey Guys,

I've added a Tax ID field to my registration. I can get the tax ID to come up when I view the orders in the admin. But the problem I am running in to is how do I pull the customers tax ID from the customers table (called and insert it into the orders table when the user checks out?

I have made fields in both the customers table (called customers_taxid in both tables) and the orders table. I just can't figure out how to bring it over on checkout.

C,
I hope this helps you..

I will half to dig out my notes, but I believe I only edited this file 3 times to make the changes for the new order to call the Customer Tax ID Number..

You might half to change the code for however you called Customer Tax ID Number

I had to shorten the code so she would send,

includes/ admin/ orders.php

Search for taxid1. line 346
2. line 347
3. line 669```php

<?php /** * @package admin * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: orders.php 6247 2007-04-21 21:34:47Z wilt $ */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); include(DIR_WS_CLASSES . 'order.php'); // prepare order-status pulldown list $orders_statuses = array(); <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'); ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo ENTRY_TAXID; ?></strong></td>
            <td class="main"><?php echo $order->customer['taxid']; ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo ENTRY_TELEPHONE_NUMBER; ?></strong></td>
            <td class="main"><?php echo $order->customer['telephone']; ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo ENTRY_EMAIL_ADDRESS; ?></strong></td>
            <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>'; ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo TEXT_INFO_IP_ADDRESS; ?></strong></td>
            <td class="main"><?php echo $order->info['ip_address']; ?></td>
          </tr>
        </table></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" valign="top"><strong><?php echo ENTRY_SHIPPING_ADDRESS; ?></strong></td>
            <td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td>
          </tr>
        </table></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" valign="top"><strong><?php echo ENTRY_BILLING_ADDRESS; ?></strong></td>
            <td class="main"><?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'); ?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
    <td class="main"><strong><?php echo ENTRY_ORDER_ID . $oID; ?></strong></td>
  </tr>
  <tr>
 <td><table border="0" cellspacing="0" cellpadding="2">
    <tr>
       <td class="main"><strong><?php echo ENTRY_DATE_PURCHASED; ?></strong></td>
       <td class="main"><?php echo zen_date_long($order->info['date_purchased']); ?></td>
    </tr>
    <tr>
       <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?></strong></td>
       <td class="main"><?php echo $order->info['payment_method']; ?></td>
    </tr>
<?php if (zen_not_null($order->info['cc_type']) || zen_not_null($order->info['cc_owner']) || zen_not_null($order->info['cc_number'])) { ?>
      <tr>
        <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td class="main"><?php echo ENTRY_CREDIT_CARD_TYPE; ?></td>
        <td class="main"><?php echo $order->info['cc_type']; ?></td>
      </tr>
      <tr>
        <td class="main"><?php echo ENTRY_CREDIT_CARD_OWNER; ?></td>
        <td class="main"><?php echo $order->info['cc_owner']; ?></td>
      </tr>
      <tr>
        <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td>
        <td class="main"><?php echo $order->info['cc_number'] . (zen_not_null($order->info['cc_number']) && !strstr($order->info['cc_number'],'X') && !strstr($order->info['cc_number'],'********') ? '  <a href="' . zen_href_link(FILENAME_ORDERS, '&action=mask_cc&oID=' . $oID, 'NONSSL') . '" class="noprint">' . TEXT_MASK_CC_NUMBER . '</a>' : ''); ?><td>
      </tr>
      <tr>
        <td class="main"><?php echo ENTRY_CREDIT_CARD_CVV; ?></td>
        <td class="main"><?php echo $order->info['cc_cvv'] . (zen_not_null($order->info['cc_cvv']) && !strstr($order->info['cc_cvv'],TEXT_DELETE_CVV_REPLACEMENT) ? '  <a href="' . zen_href_link(FILENAME_ORDERS, '&action=delete_cvv&oID=' . $oID, 'NONSSL') . '" class="noprint">' . TEXT_DELETE_CVV_FROM_DATABASE . '</a>' : ''); ?><td>
      </tr>
      <tr>
        <td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td>
        <td class="main"><?php echo $order->info['cc_expires']; ?></td>
      </tr>
<?php } ?>
    </table></td>
  </tr>
<?php if (method_exists($module, 'admin_notification')) { ?>
  <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
    <?php echo $module->admin_notification($oID); ?>
  </tr>
  <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
<?php } ?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr class="dataTableHeadingRow">
        <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
        <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
        <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
        <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
        <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
        <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
        <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
      </tr>
<?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { echo '<br /><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</strong></td>' . "\n"; echo ' </tr>' . "\n"; } ?>
      <tr>
        <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?>
        </table></td>
      </tr>
    </table></td>
  </tr>
<?php // show downloads require(DIR_WS_MODULES . 'orders_download.php'); ?>
  <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
    <td class="main"><table border="1" cellspacing="0" cellpadding="5">
      <tr>
        <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_DATE_ADDED; ?></strong></td>
        <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></strong></td>
        <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_STATUS; ?></strong></td>
        <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td>
      </tr>
<?php $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . zen_db_input($oID) . "' order by date_added"); if ($orders_history->RecordCount() > 0) { while (!$orders_history->EOF) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history->fields['customer_notified'] == '1') { echo zen_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo zen_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n"; echo ' <td class="smallText">' . nl2br(zen_db_output($orders_history->fields['comments'])) . ' </td>' . "\n" . ' </tr>' . "\n"; $orders_history->MoveNext(); } } else { echo ' <tr>' . "\n" . ' <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n"; } ?>
    </table></td>
  </tr>
  <tr>
    <td class="main noprint"><br /><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td>
  </tr>
  <tr>
    <td class="noprint"><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
  </tr>
  <tr><?php echo zen_draw_form('status', FILENAME_ORDERS, zen_get_all_get_params(array('action')) . 'action=update_order', 'post', '', true); ?>
    <td class="main noprint"><?php echo zen_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
  </tr>
  <tr>
    <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" cellspacing="0" cellpadding="2" class="noprint">
      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><strong><?php echo ENTRY_STATUS; ?></strong> <?php echo zen_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td>
          </tr>
          <tr>
            <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> <?php echo zen_draw_checkbox_field('notify', '', true); ?></td>
            <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo zen_draw_checkbox_field('notify_comments', '', true); ?></td>
          </tr>
        </table></td>
        <td valign="top"><?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?></td>
      </tr>
    </table></td>
  </form></tr>
  <tr>
    <td colspan="2" align="right" class="noprint"><?php echo '<a href="' . zen_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . zen_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . zen_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('action'))) . '">' . zen_image_button('button_orders.gif', IMAGE_ORDERS) . '</a>'; ?></td>
  </tr>
<?php // check if order has open gv $gv_check = $db->Execute("select order_id, unique_id from " . TABLE_COUPON_GV_QUEUE ." where order_id = '" . $_GET['oID'] . "' and release_flag='N' limit 1"); if ($gv_check->RecordCount() > 0) { $goto_gv = '<a href="' . zen_href_link(FILENAME_GV_QUEUE, 'order=' . $_GET['oID']) . '">' . zen_image_button('button_gift_queue.gif',IMAGE_GIFT_QUEUE) . '</a>'; echo ' <tr><td align="right"><table width="225"><tr>'; echo ' <td align="center">'; echo $goto_gv . '  '; echo ' </td>'; echo ' </tr></table></td></tr>'; } ?> <?php } else { ?>
  <tr>
    <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
        <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
        <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr><?php echo zen_draw_form('orders', FILENAME_ORDERS, '', 'get', '', true); ?>
            <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . zen_draw_input_field('oID', '', 'size="12"') . zen_draw_hidden_field('action', 'edit') . zen_hide_session_id(); ?></td>
          </form></tr>
          <tr><?php echo zen_draw_form('status', FILENAME_ORDERS, '', 'get', '', true); ?>
            <td class="smallText" align="right">
              <?php
                echo HEADING_TITLE_STATUS . ' ' . zen_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"');
                echo zen_hide_session_id();
              ?>
            </td>
          </form></tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td class="smallText"><?php echo TEXT_LEGEND . ' ' . zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_BILLING_SHIPPING_MISMATCH, 10, 10) . ' ' . TEXT_BILLING_SHIPPING_MISMATCH; ?>
      </td>
      <tr>
        <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr class="dataTableHeadingRow">
<?php // Sort Listing switch ($_GET['list_order']) { case "id-asc": $disp_order = "c.customers_id"; break; case "firstname": $disp_order = "c.customers_firstname"; break; case "firstname-desc": $disp_order = "c.customers_firstname DESC"; break; case "lastname": $disp_order = "c.customers_lastname, c.customers_firstname"; break; case "lastname-desc": $disp_order = "c.customers_lastname DESC, c.customers_firstname"; break; case "company": $disp_order = "a.entry_company"; break; case "company-desc": $disp_order = "a.entry_company DESC"; break; default: $disp_order = "c.customers_id DESC"; } ?>
            <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDERS_ID; ?></td>
            <td class="dataTableHeadingContent" align="left" width="50"><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></td>
            <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
            <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
            <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
          </tr>
<?php // create search filter $search = ''; if (isset($_GET['search']) && zen_not_null($_GET['search'])) { $keywords = zen_db_input(zen_db_prepare_input($_GET['search'])); $search = " and (o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.date_purchased like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.customers_taxid like '%" . $keywords . "%' or o.ip_address like '%" . $keywords . "%')"; } ?>

But you know what, A killer learning Experience.. :smile:
25 Apr 2008, 7:52 AM
#6
cyberwoolf avatar

cyberwoolf

Zen Follower

Join Date:
Oct 2005
Posts:
97
Plugin Contributions:
0

Re: Pulling Info From Customers Table On an Order

kobra:

You will be more successful if you determine an existing call that is present on all transactions like customer name. Search for all the files where this happens and make a list.

I did a search in the developers tool kit for 'firstname'. I added new lines replacing firstname with taxid and still no luck.

wolfsz:

Hi there
Before you start doing programming, is it possible to use one of the existing fields instead?

Yea.. I thought about that too but I am using all the fields, unfortunately :-(

haredo:

C,
I hope this helps you..

I will half to dig out my notes, but I believe I only edited this file 3 times to make the changes for the new order to call the Customer Tax ID Number..

You might half to change the code for however you called Customer Tax ID Number

After I finished this I found out there was a mod in the downloads section, dang the luck...

But you know what, A killer learning Experience.. :smile:

Thanks! I did try editing that file before and I do get the tax id to come up when I view an order in the backend, but the problem I am having is trying to get the taxid to commit to the orders database so it will pull it in and display it on the customer front end. It seems to be pulling the data from the orders table, which is not saving the taxid on checkout.

I was looking at the mod, but it looks like there are a ton of problems and that scares me!! :-D

Thanks for the help! Any other ideas? I just need to commit the new taxid field pulled from the customers table to the orders table on checkout :-(

25 Apr 2008, 9:00 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Pulling Info From Customers Table On an Order

See this thread for possible pointers on first name
http://www.zen-cart.com/forum/showthread.php?t=95550

25 Apr 2008, 12:26 PM
#8
cyberwoolf avatar

cyberwoolf

Zen Follower

Join Date:
Oct 2005
Posts:
97
Plugin Contributions:
0

Re: Pulling Info From Customers Table On an Order

Thanks, I wanted to try to work it out on my own but it's urgent now so I'm posting in the commercial section.