Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order History Problem


zackman2

Recommended Posts

Hi,

 

For some reason I've having problems with bringing up order history on the customer side. I've been doing some diagnosis and the order history (in account_history.php) is more than 0 but when it tries to bring in the order history it doesn't and it shows on the screen: Displaying 0 to 0 (of 0 orders) Result Pages: -4 -3 -2 -1 0

 

I've tried running the SQL query within MySQL but it shows 0 queries there also. Am i missing something?

 

here is the code from the account_history.php

$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id DESC";

$history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);

$history_query = tep_db_query($history_split->sql_query);

 

 

Thanks - Zack

Link to comment
Share on other sites

and s.public_flag = '1' order by orders_id DESC";

The column public flag was added to the table orders_status in RC2. Did you also run the queries needed for the update like:

alter table orders_status add public_flag int DEFAULT '1';
alter table orders_status add downloads_flag int DEFAULT '0';

Those queries are found in the beginning of upgrade.html under the heading

 Database changes[/b]
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...