Skip to content

Commit

Permalink
#4: Correct zc156 integration
Browse files Browse the repository at this point in the history
  • Loading branch information
lat9 committed Feb 15, 2019
1 parent 889669f commit a0abb41
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
10 changes: 10 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@ Changes in 3.2.0, 2017-10-18 (lat9)
[BUGFIX] Manufacturer filter was not being honored
[CHANGE] Applied PSR-2 styling to the various modules.
[BUGFIX] Correct year display for "Last Year" selection.

=====================================
Changes in 3.2.1, 2019-02-15 (lat9)
=====================================
[CHANGE] Interoperability with zc156, given that the language-file load order has changed.

Modified:
/YOUR_ADMIN/stats_sales_report.php
/YOUR_ADMIN/includes/languages/english/stats_sales_report.php

=====================================
Sponsored by Destination ImagiNation, Inc.
www.destinationimagination.org
Expand Down
22 changes: 2 additions & 20 deletions YOUR_ADMIN/includes/languages/english/stats_sales_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,9 @@

//////////////////////////////////////////////////////////
// TIMEFRAME DATE DISPLAY
// These control the display format of the start and end
// dates of each timeframe line. Each define corresponds
// to the timeframe of its namesake. See the PHP manual
// entry on the date() function for a table on the accepted
// formatting characters: http://us2.php.net/date
// Note: Other constants moved to the main processing file for v3.2.1.
//
if (strtolower(DATE_FORMAT) == 'm/d/y') {
// Use US date format (m/d/Y)
define('TIME_DISPLAY_DAY', 'n-j-Y');
define('TIME_DISPLAY_WEEK', 'n-j-Y');
define('TIME_DISPLAY_MONTH', 'n-j-Y');
define('TIME_DISPLAY_YEAR', 'n-j-Y');
define('DATE_SPACER', ' thru<br/>&nbsp;&nbsp;&nbsp;');
} elseif (strtolower(DATE_FORMAT) == 'd/m/y') {
// Use UK date format (d/m/Y)
define('TIME_DISPLAY_DAY', 'jS-M-y');
define('TIME_DISPLAY_WEEK', 'jS-M-y');
define('TIME_DISPLAY_MONTH', 'jS-M-y');
define('TIME_DISPLAY_YEAR', 'jS-M-y');
define('DATE_SPACER', ' to<br/>&nbsp;&nbsp;&nbsp;');
}
define('DATE_SPACER', ' to<br />&nbsp;&nbsp;&nbsp;');

//////////////////////////////////////////////////////////
// EXCLUDE SPECIFIED PRODUCTS
Expand Down
17 changes: 17 additions & 0 deletions YOUR_ADMIN/stats_sales_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@

require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

//////////////////////////////////////////////////////////
// TIMEFRAME DATE DISPLAY
// These control the display format of the start and end
// dates of each timeframe line. Each define corresponds
// to the timeframe of its namesake. See the PHP manual
// entry on the date() function for a table on the accepted
// formatting characters: http://us2.php.net/date
//
// Moved here from the report's language file for v3.2.1 to provide zc156 interoperation,
// given that that version has changed the loading order of admin language files.
//
$time_display = (strtolower(DATE_FORMAT) == 'd/m/y') ? 'n-j-Y' : 'jS-M-y';
define('TIME_DISPLAY_DAY', $time_display);
define('TIME_DISPLAY_WEEK', $time_display);
define('TIME_DISPLAY_MONTH', $time_display);
define('TIME_DISPLAY_YEAR', $time_display);

// we ramp up the execution time to make sure those
// really big reports don't time out
Expand Down

0 comments on commit a0abb41

Please sign in to comment.