Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Addition Customer Information


dvankuren

Recommended Posts

Good morning.

 

I was hoping someone would be willing to give me a hand in adding some additional information to admin/orders.php - I am a novice at PHP programming so please bear that in mind.

 

What I have managed to do is create an additional field within the customer registration screen that allows people to enter their job title or profession. It takes that information and inserts it into the customers table under the field customers_title.

 

What I have been unable to determine is at what point it takes the customer information and inserts it into the order database (I created a field within that database called customers_title as well). I would like (need) this title to appear on the Order Detail form either from the orders database or from the customer database (whichever would be easier for me).

 

Thanks in advance.

Link to comment
Share on other sites

One way of doing it would be to run a query on the admin/orders page to find that customers job title from the customers table and display it.

 

For Example:

$customer_title_query = tep_db_query("select c.customers_title from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c where o.customers_id = c.customers_id and o.orders_id = '" . (int)$oID . "'");
$customer_title = tep_db_fetch_array($customer_title_query);
echo $customer_title['customer_title'];

 

good luck

 

Matt

Matt Peace

Link to comment
Share on other sites

One way of doing it would be to run a query on the admin/orders page to find that customers job title from the customers table and display it.

 

For Example:

$customer_title_query = tep_db_query("select c.customers_title from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c where o.customers_id = c.customers_id and o.orders_id = '" . (int)$oID . "'");
$customer_title = tep_db_fetch_array($customer_title_query);
echo $customer_title['customer_title'];

 

good luck

 

Matt

 

That did the trick. All i had to do was add an "s" to echo $customer_title['customers_title']; and everything worked like a charm. Many thanks for you taking the time to answer my post.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...