Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

display number changes in customer order admin side


Lacoart

Recommended Posts

<tr>

<td class="main"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td>

<td class="main"><?php echo $oID; ?></td>

 

works

-----------------------------------------------------------------------------------------------------------------------------------

 

<td> </td>

<td> </td>

<td class="main"><b><?php echo ENTRY_CUSTOMERS_NUMBER; ?></b></td>

<td class="main"><?php echo $cID; ?></td>

 

<td> </td>

does not work

Link to comment
Share on other sites

@@Lacoart

You didn't say what version you were running so if you are not running 2.2 RC2 take what I say with a grain of salt....if fact you might want to do that anyway. :D

 

From what I can tell the customers_id it not available in orders.php, at least not in the stock version, so you'll need to modify the orders class to pick it up...after that you should access it as follows...

 

$order->customer['customers_id']

 

Mess around with that and if you have any problems just ask...

 

Dan

Link to comment
Share on other sites

Not sure what you are asking but if you're wondering if that is the correct file to modify....then yes it is. Post if you have problems modifying it. I'll help but I'm not doing it for you.

 

Dan

Link to comment
Share on other sites

Hello,

 

I'm sorry for my English is not very correct ......

 

I modified the file order.php

 

$order_query = tep_db_query("select customers_id,

 

$this->customer = array('customer' => $order['customers_id'],

 

 

I modified the file orders.php

 

$order->customer['customers_id']

 

does not work :sweating:

 

Lacoart

Link to comment
Share on other sites

I tried to change so ......

 

in order.php

 

$order_query = tep_db_query("select customers_gender, customers_fax " . TABLE_CUSTOMERS . "' and customers_id != '" . (int)$customers_id . "'");

 

$this->customer = array('gender' => $order['customers_gender'],

('fax' => $order['customers_fax'],

 

 

 

in orders.php

 

<td class="main"><b><?php echo ENTRY_GENDER; ?></b></td>

<td class="main"><?php echo $order->customer['gender']; ?></td>

</tr>

 

<td class="main"><b><?php echo ENTRY_FAX_NUMBER; ?></b></td>

<td class="main"><?php echo $order->customer['fax']; ?></td>

</tr>

 

 

but unfortunately it does not work :'(

 

Lacoart

Link to comment
Share on other sites

I don't see anything obvious but I do wonder if you have any information in those fields for the order you're looking at and/or testing? The other thing that strikes me is whether you have the $order_query correct....I assume that you just posted a snippet but if you do have information in those fields and it still isn't working, post the full query and I'll have another look.

 

Dan

Link to comment
Share on other sites

The complete query is this:

 

$order_query = tep_db_query("select customers_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_piva, billing_cf, 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 . " customers_gender, customers_fax " . TABLE_CUSTOMERS . "' and customers_id != '" . (int)$customers_id . "'");

 

This query does not show any error online................... :wacko:

Link to comment
Share on other sites

I don't think that query is going to work....you need to move the customers_gender, customers_fax up into the SELECT portion of the query....put them between say the customers_telephone and customers_email_address and put the WHERE part of the query back to the way it was. I think that should do it.

Link to comment
Share on other sites

this is the original query:

 

$order_query = tep_db_query("select customers_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_piva, billing_cf, 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 . "'");

 

 

data customers_gender and customers_fax are not present in TABLE_ORDERS

 

data present in TABLE_CUSTOMERS

 

you can do the same or is it a problem????

 

Lacoart

Link to comment
Share on other sites

That is not a problem but you'll need to add or join the Customer Table to the query....my query was modified for SPPC and looks like this....

 

$order_query = tep_db_query("select customers_id, customers_name, customers_dob, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, o.customers_telephone, o.customers_email_address, customers_address_format_id, customers_group_name, 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, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " o left join " . TABLE_CUSTOMERS . " using(customers_id) left join " . TABLE_CUSTOMERS_GROUPS . " using(customers_group_id) where orders_id = '" . (int)$order_id . "'");

 

You probably don't have the Customer Groups Table so you'll need to remove that join from the query...

 

Dan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...