Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Processing order count wrong


DavidR

Recommended Posts

Posted

My SQL skills are very rusty or I might figure this out. The admin info box named "Orders" shows at first glance how many orders are pending, processing, etc. You can click on the link to each and be taken to the main orders page sorting under whatever status you selected. Mine lists 7 orders processing while only two show up when sorting that way in the main order list. There are too many orders to just peek in the db, so does anyone have any idea how I could fix this?

 

The code that determines the count is in admin/index.php:

 

  $orders_contents = '';
 $orders_status_query = tep_db_query("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'");
 while ($orders_status = tep_db_fetch_array($orders_status_query)) {
$orders_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status['orders_status_id'] . "'");
$orders_pending = tep_db_fetch_array($orders_pending_query);

 

If I could find out which orders this is including that it shouldn't be, I might make some sense of it. Even a basic SQL query to use in phpMyAdmin would be appreciated. Thanks.

 

MS2.2

Archived

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

×
×
  • Create New...