The order data in the ecshop background is not statistically correct, and the problem is defined in the order_status.php file function get_orderinfo ($start _date, $end _date), where all of the SQL uses the following code:
function Get_orderinfo ($start _date, $end _date)
{
$order _info = Array ();
/* Not confirmed order number * *
$sql = ' SELECT COUNT (*) as Unconfirmed_num from '. $GLOBALS [' ECS ']->table (' Order_info ').
"WHERE order_status = '". Os_unconfirmed. "' and Add_time >= ' $start _date '".
"And Add_time < '". ($end _date + 86400). "'";
Obviously, there's a very obvious logic error here, $end_date+86400, unless the user chooses a start and end time of the same day, there is no need to add 86400 (86,400 seconds equals 1 days), This error result will result in the last order count being not the data for the specified time period, but a day after the specified time.
In addition Ecshop itself the order confirmation function, resulting in the default Order statistics page, which shows only unconfirmed, confirmed, closed, invalid four information. None of these four information includes the most important information about the number of orders that have been paid
Simply change the useless confirmed order statistics code to the paid statistic code:
/* Confirmed order number */
$sql = ' SELECT count (*) as Confirmed_num from '. $GLOBALS [' ECS ']->table (' Order_i NFO ').
WHERE order_status = '. Os_confirmed. "' and Shipping_status not '. Db_create_in (Array (ss_shipped, ss_received)). "and Pay_status not". Db_create_in (Array (ps_payed, ps_paying)). " and Add_time >= ' $start _date '.
"and Add_time <". ($end _date + 86400). "'";
$order _info[' confirmed_num '] = $GLOBALS [' db ']->getone ($sql);
Change to:
/* by Tiandi number of orders paid/*
$sql = ' SELECT COUNT (*) as Confirmed_num from '. $GLOBALS [' ECS ']->table (' Order_info ').
"WHERE pay_status =". Ps_payed. " and Shipping_status not ". Db_create_in (Array (ss_shipped, ss_received)). " and Add_time >= ' $start _date '.
"And Add_time < $end _date";
$order _info[' confirmed_num '] = $GLOBALS [' db ']->getone ($sql);
You can repair the Ecshop statistics do not prepare the problem.