Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Should be simple....


gtilflm

Recommended Posts

Hello. I would like to display the customer's ID on orders.php in Admin.

 

I changed:

 

		$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

to:

 

		$check_status_query = tep_db_query("select customers_id, customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

(basically just added customers_id to the list)

 

 

 

And I inserted:

 

<!-- Added to display customer_id -->		  
	  <tr>
		<td class="main"><b><?php echo 'Customer ID:'; ?></b></td>
		<td class="main"><?php echo $order->customer['customers_id']; ?></td>
	  </tr>
<!-- End added -->

 

below:

 

<tr>
		<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
		<td class="main"><?php echo $order->info['payment_method']; ?></td>
	  </tr>

 

but I got no love from that.....

 

Any ideas?

 

Thanks.

Link to comment
Share on other sites

Hi, I got a kiss from following

 

1) in admin/includes/classes/order.php add this line to the customer array

'customers_id' => $order['customers_id'],

 

2) In admin/includes/languages/yourlanguage/orders.php enter this

define('ENTRY_CUSTOMERS_ID', 'Customers ID:');

 

3) In admin/orders.php add (as you did)

 

 

<!-- Added to display customer_id -->		  
	  <tr>
		<td class="main"><b><?php echo 'Customer ID:'; ?></b></td>
		<td class="main"><?php echo $order->customer['customers_id']; ?></td>
	  </tr>
<!-- End added -->

 

below:

 

<tr>
		<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
		<td class="main"><?php echo $order->info['payment_method']; ?></td>
	  </tr>

 

 

You can add the order ID in the same way

 

Hope it worked for you :)

Link to comment
Share on other sites

One more thing I forgott

 

In admin/includes/classes/order.php you need to add the customer_id to the selection, something like this:

 $order_query = tep_db_query("select customers_id, orders_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...