Sales Reports goes to blank page

I can't open Sales Reports - it keeps going to a blank page. I cleared cache, etc.

Mine just returns a 404 Page Not Found.

I opened a support ticket with CS-Cart and they told me I had too many orders. They reset the default select criteria to Today's orders and Sales Reports ran. I changed the data range to This Month and got a 404 again.

I only have 46 orders so far this month, so apparently THAT'S TOO MANY!



That experience cost me 10 credits!



Other users on this forum say they have 10,000 orders and the reports will run. I don't know what's wrong with the Sales Reports. It's always been a crappy report anyway. I get real sales and inventory reports from the Accounting software, but it would be nice if all the features of the CS-Cart software would work.

[quote name='Magpie Don' timestamp='1356038427' post='151527']

Mine just returns a 404 Page Not Found.

I opened a support ticket with CS-Cart and they told me I had too many orders. They reset the default select criteria to Today's orders and Sales Reports ran. I changed the data range to This Month and got a 404 again.

I only have 46 orders so far this month, so apparently THAT'S TOO MANY!



That experience cost me 10 credits!



Other users on this forum say they have 10,000 orders and the reports will run. I don't know what's wrong with the Sales Reports. It's always been a crappy report anyway. I get real sales and inventory reports from the Accounting software, but it would be nice if all the features of the CS-Cart software would work.

[/quote]



You have a shitty server configuration or resources.

I have over a short of 50,000 orders total, I can run the report with dedicated resources without issue.

Jesse, That's why I was so frustrated by this, since I KNOW that the server is NOT the problem, I run dedicated resources as well - yet the error has all the symptoms of a server with too little resources.



Anastasiya Kozlova, CS-Cart Technical Support Engineer, followed up on my report that their limiting the report data didn't solve the problems and provided this fix:



“The problem occurred because of your time zone. In the latest version of CS-Cart the gmmktime() PHP function is used to generate GMT timestamps but in the previous version mktime() PHP function was used. This function generates local timestamps. Unfortunately, for your time zone the date value was not equal to the current date. I have made the necessary code changes to the fn.sales_reports.php file located in the core directory of your CS-Cart installation and the problem was gone.”



The change they made was to /core/fn.sales_reports.php line 72:


$time_end += ($intervals['0']['interval_id'] == '7') ? (gmmktime(0, 0, 0, date("m", $time_end) + 1, 3, date("Y", $time_end)) - $time_end) : $temp['value'];



I don't know if the change is specific to my timezone or not. I'm not willing to take the time to research the gmmktime format at the moment.



It is a bug in the new version. I thank Anastasiya Kozlova for her assistance.

[quote name='Magpie Don' timestamp='1356110505' post='151568']

Jesse, That's why I was so frustrated by this, since I KNOW that the server is NOT the problem, I run dedicated resources as well - yet the error has all the symptoms of a server with too little resources.



Anastasiya Kozlova, CS-Cart Technical Support Engineer, followed up on my report that their limiting the report data didn't solve the problems and provided this fix:



“The problem occurred because of your time zone. In the latest version of CS-Cart the gmmktime() PHP function is used to generate GMT timestamps but in the previous version mktime() PHP function was used. This function generates local timestamps. Unfortunately, for your time zone the date value was not equal to the current date. I have made the necessary code changes to the fn.sales_reports.php file located in the core directory of your CS-Cart installation and the problem was gone.”



The change they made was to /core/fn.sales_reports.php line 72:


$time_end += ($intervals['0']['interval_id'] == '7') ? (gmmktime(0, 0, 0, date("m", $time_end) + 1, 3, date("Y", $time_end)) - $time_end) : $temp['value'];



I don't know if the change is specific to my timezone or not. I'm not willing to take the time to research the gmmktime format at the moment.



It is a bug in the new version. I thank Anastasiya Kozlova for her assistance.

[/quote]



I made this change in my core file & it seems to have solved my problem as well. Thanks for the post.