This shows you the differences between two versions of the page.
tutorials:zencartmods:daily_stats.html [2011/06/08 15:44] daigo |
tutorials:zencartmods:daily_stats.html [2016/01/28 18:05] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Make a Daily Sales Stats Page ==== | ||
- | |||
- | We like to have a quick and easy way to see how sales are doing every day. | ||
- | |||
- | To make one of your own, first lets make an admin page. This part is identical to the [[tariffhelper.html|Tariff Helper File Mod]], but the word phrase "edit_tariff" had been replaced with "daily_stats". | ||
- | |||
- | New Files: | ||
- | * admin/includes/boxes/extra_boxes/daily_stats_reports_dhtml.php | ||
- | * admin/includes/extra_datafiles/daily_stats_definitions.php | ||
- | * admin/includes/languages/english/extra_definitions/daily_stats.php | ||
- | * admin/daily_stats.php | ||
- | |||
- | |||
- | === admin/includes/boxes/extra_boxes/daily_stats_reports_dhtml.php === | ||
- | |||
- | This filename decides which menu to put the link under. We're going to put it under "Reports", you can put it under whatever you like. | ||
- | |||
- | This is the entire contents of this file | ||
- | <code php> | ||
- | <?php | ||
- | $za_contents[] = array('text' => BOX_CATALOG_DAILY_STATS, 'link' => zen_href_link(FILENAME_DAILY_STATS, '', 'NONSSL')); | ||
- | ?> | ||
- | </code> | ||
- | |||
- | === admin/includes/extra_datafiles/daily_stats_definitions.php === | ||
- | |||
- | This is the entire contents of this file | ||
- | <code php> | ||
- | <?php | ||
- | define('FILENAME_DAILY_STATS', 'daily_stats.php'); | ||
- | ?> | ||
- | </code> | ||
- | |||
- | === admin/includes/languages/english/extra_definitions/daily_stats.php === | ||
- | |||
- | All thats in this one | ||
- | <code php> | ||
- | <?php | ||
- | define('BOX_CATALOG_DAILY_STATS','daily stats'); | ||
- | ?> | ||
- | </code> | ||
- | |||
- | After these 3 files are created, you should have a menu item under "Reports" that looks like this. | ||
- | |||
- | {{:tutorials:zencartmods:daily_menu.png|}} | ||
- | |||
- | But the link doesnt go anywhere yet, so lets make that file next. | ||
- | |||
- | |||
- | === admin/daily_stats.php === | ||
- | |||
- | You can make the actual stats file as fancy as you like, we have a very simple and bare-bones version that you can use here. | ||
- | |||
- | {{:tutorials:zencartmods:daily_stats.php.zip|}} | ||