v3.2.0 is now available for download.
Printable View
Just installed this mod but when I go to the report link I get a white page with the words "Illegal Access" at the top left of the screen. Zen vrs 1.5.5c
That "Illegal Access" usually means that the plugin was being used outside of the Zen Cart environment (the IS_ADMIN_FLAG definition is used for the determination). The only place in the Sales Report's distribution that the message is used is in /YOUR_ADMIN/includes/functions/extra_functions/stats_sales_report.php.
Unfortunately, the plugin has historically included multiple files of the same name, i.e. stats_sales_report.php. Make sure that you didn't "finger-check" and copy that extra_functions version of the file to the /YOUR_ADMIN directory.
Nope, that extra-functions one is what adds the link to the report itself. What happens if you edit that /extra_functions/sales_report.php, changing
toCode:<?php
/**
* SALES REPORT 3.1
*
* @author Frank Koehl (PM: BlindSide)
* @author Conor Kerr <[email protected]>
* @updated by stellarweb to work with version 1.5.0 02-29-12
* @copyright Portions Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License V2.0
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
if (!zen_page_key_exists('stats_sales_report')) {
// Add Monthly Report link to Reports menu
zen_register_admin_page('stats_sales_report', 'BOX_REPORTS_SALES_REPORT','FILENAME_STATS_SALES_REPORT', '', 'reports', 'Y', 17);
}
}
?>
Is a debug-log generated after that change or do you still see the "Illegal access" message? If a debug-log is created, please post it back.Code:<?php
/**
* SALES REPORT 3.1
*
* @author Frank Koehl (PM: BlindSide)
* @author Conor Kerr <[email protected]>
* @updated by stellarweb to work with version 1.5.0 02-29-12
* @copyright Portions Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License V2.0
*/
if (!defined('IS_ADMIN_FLAG')) {
trigger_error('Illegal Access', E_USER_WARNING);
}
if (function_exists('zen_register_admin_page')) {
if (!zen_page_key_exists('stats_sales_report')) {
// Add Monthly Report link to Reports menu
zen_register_admin_page('stats_sales_report', 'BOX_REPORTS_SALES_REPORT','FILENAME_STATS_SALES_REPORT', '', 'reports', 'Y', 17);
}
}
?>
Interesting. I made the change and as dreamweaver was uploading, part of the text kept saying "sales report gives illegal access error. I then went to admin and the report is there ( not fully tested it yet so do not know if working as should be) an error log was created but it is 1723 lines long I am just replacing my admin folder details on it. Would you still like it posted here or PM'd
Paraphrasing Elmer Fudd, be vewwy, vewwy careful when using dreamweaver for file editing, etc. Unless you are vewwy, vewwy careful, it will add code that will munge things up in a hurry.
I often tell customers that want to use programs like that to open Word, type Hello World!, save it as html, then open it in notepad. You'll be amazed.
Stick to the simple editors. If you've just got to have some bells and whistles, try Ultra-Edit. Like Dreamweaver, it's commercial but it does not add extraneous code.