Jump to content

[solved] My stats dashboard does not work!


Recommended Posts

My stats dashboard does not work!

 

stats%20dashboard.JPG

You can see that there are two entries for 2011-10-30??? and todays date 2011-11-03 is missing...

 

can anyone help please - I have tried uninstalling the dashboard..reinstalling it...resetting it and throwing it out of the window but with no luck

Link to comment
Share on other sites

Hi davidking,

 

This issue has been fixed.

 

You need to modify statsforecast.php in statsforecast module folder.

 

Replace


if ($cookie->stats_granularity == 10)

{

$dateEnd = strtotime($employee->stats_date_to.' 23:59:59');

$dateToday = time();

for ($i = strtotime($employee->stats_date_from.' 00:00:00'); $i <= $dateEnd AND $i <= $dateToday; $i += 86400) {
$dataTable[date('Y-m-d', $i)] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalProducts' => 0);
}

}

while ($row = $db->nextRow($result))

$dataTable[strtotime($row['fix_date'])] = $row;

 

with

 

if ($cookie->stats_granularity == 10)

{

$dateEnd = strtotime($employee->stats_date_to.' 23:59:59');

$dateToday = time();

for ($i = strtotime($employee->stats_date_from.' 00:00:00'); $i <= $dateEnd AND $i <= $dateToday; $i = strtotime("+1 day", $i)) {
$dataTable[date('Y-m-d', $i)] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalProducts' => 0);
}

}

while ($row = $db->nextRow($result))

$dataTable[$row['fix_date']] = $row;

Link to comment
Share on other sites

We have made another change line 133/134 of /modules/statsforecast/statforecast.php

 

You must replace with :

 

for ($i = strtotime($employee->stats_date_from.' 00:00:00'); $i <= $dateEnd AND $i <= $dateToday; $i = strtotime('+1 day', $i))
   $dataTable[date('Y-m-d', $i)] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalProducts' => 0);

 

 

You can also find the modified file on the svn :

 

http://svn.prestasho.../statsforecast/

Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...