davidking Posted November 3, 2011 Share Posted November 3, 2011 My stats dashboard does not work! 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 More sharing options...
Carl Favre Posted November 3, 2011 Share Posted November 3, 2011 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 More sharing options...
davidking Posted November 4, 2011 Author Share Posted November 4, 2011 Thank you, Presta Team this has removed the double entry and seems to have sorted the issue! (((( )))) Link to comment Share on other sites More sharing options...
Carl Favre Posted November 4, 2011 Share Posted November 4, 2011 Glad we could help . Link to comment Share on other sites More sharing options...
Carl Favre Posted November 4, 2011 Share Posted November 4, 2011 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 More sharing options...
cbelea Posted November 6, 2011 Share Posted November 6, 2011 Hello, I've replaced /modeules/statsforecast/statsforecast.php with the one from from svn, but something is still wrong: Best regards. Link to comment Share on other sites More sharing options...
Carl Favre Posted November 7, 2011 Share Posted November 7, 2011 Hi cbelea, Could you send me your FTP login/password in MP so we can check what is going on ? Thanks . Link to comment Share on other sites More sharing options...
cbelea Posted November 7, 2011 Share Posted November 7, 2011 Hello, I've done it yesterday Best regards. Link to comment Share on other sites More sharing options...
Carl Favre Posted November 8, 2011 Share Posted November 8, 2011 Yes I received it, thanks. We are looking into it ! Link to comment Share on other sites More sharing options...
Carl Favre Posted November 9, 2011 Share Posted November 9, 2011 cbelea, your issue should be fixed now, can you confirm it ? Damien took care of it . Statsforecast.php has also been updated on the SVN. Link to comment Share on other sites More sharing options...
cbelea Posted November 9, 2011 Share Posted November 9, 2011 Thank you, it's ok now. Link to comment Share on other sites More sharing options...
aicash Posted February 11, 2014 Share Posted February 11, 2014 Hi I miss and deleted my stats folder can someone help me fix it back please Link to comment Share on other sites More sharing options...
Recommended Posts