Zen Follower
- Join Date:
- Oct 2005
- Posts:
- 280
- Plugin Contributions:
- 0
Sales report 2.0
will try and get back.
Thanks
Zen Follower
will try and get back.
Thanks
Zen Follower
Did the changes, however under date it still shows the same as below, however do not get any error in the logs:
IST0JanE_Tue0st+05:300AM2019_TueAM2019
Zen Follower
Sorry for the incorrect file reference.
The date format ```
define('DATE_FORMAT', 'd/m/Y'); // this is used for date() // BMH addition PHP 7
should be placed in YOUR_ADMIN\stats-sales_report.php at approx line 29.
OldNGrey
ZC222 PHP 8.4.27
MySQL 11.8.5-MariaDB
Administrator
I've got a GitHub update staged that, I believe, addresses this issue: https://github.com/lat9/sales_report/issues/4
Administrator
lat9:
I've got a GitHub update staged that, I believe, addresses this issue: https://github.com/lat9/sales_report/issues/4
I've just submitted v3.2.1 of Sales Report to the Zen Cart devs for review. Once accepted, it can be downloaded from this link: https://www.zen-cart.com/downloads.php?do=file&id=9
This release contains the changes associated with the following GitHub issue:
#4: zc156 inter-operation due to language-file load-order change.
If you can't wait for the changes to be posted on the Zen Cart link, you can download the report's distribution zip-file from its GitHub repository: https://github.com/lat9/sales_report/releases/tag/v3.2.1
Administrator
v3.2.1 of Sales Report is now available for download (thanks, @swguy!).
New Zenner
Any idea how to fix the SpiffyCal layout? I'm assuming this has to do with the new Bootstrap based Admin style or the updates to the calendar javascript in 1.5.6a, but when attempting to choose a custom date, the calendar goes off the left side of the screen and browser doesn't allow scrolling to the left.
ZenCart 1.5.6a
PHP 7.1
Tested in Firefox 65, Chrome 72, MS Edge
[Attachment no longer available]
zennedOut
gwynwyffar:
Any idea how to fix the SpiffyCal layout? I'm assuming this has to do with the new Bootstrap based Admin style or the updates to the calendar javascript in 1.5.6a, but when attempting to choose a custom date, the calendar goes off the left side of the screen and browser doesn't allow scrolling to the left.
ZenCart 1.5.6a
PHP 7.1Tested in Firefox 65, Chrome 72, MS Edge
[Attachment no longer available]
the problem is with the spiffyCal plugin that comes with the base ZC package. it is version 2.1 and dated 2001. i think this is a plugin that needs to be replaced by the ZC team.
this spiffyCal is used in a number of places, so changes here can affect where it is used elsewhere. so use with caution.
if you go here:
YOUR_ADMIN/includes/javascript/spiffyCal/spiffyCal_v2_1.js
lines 1026 and 1037; you will see:
change that to
-10
not sure how it will affect other dates in your admin.
if (scIE) {
if (this.displayLeft) {
scX = getOffsetLeft(document.images[this.btnName]) - 10 + document.images[this.btnName].width;
} else {
scX = getOffsetLeft(document.images[this.btnName]);
}
if (this.displayTop) {
scY = getOffsetTop(document.images[this.btnName]) - 138;
} else {
scY = getOffsetTop(document.images[this.btnName]) + document.images[this.btnName].height + 2;
}
} else if (scNN) {
if (this.displayLeft) {
scX = document.images[this.btnName].x - 10 + document.images[this.btnName].width;
} else {
scX = document.images[this.btnName].x;
Administrator
Thanks, @carlwhat, for that investigation. I've noted the issue on Sales Report's GitHub repository (https://github.com/lat9/sales_report/issues/5).
Please note that since it's a Zen Cart core-file involved, it's not likely that I'll be including that change with the plugin ... other than to document the anomaly and your fix.
Administrator
lat9:
Thanks, @carlwhat, for that investigation. I've noted the issue on Sales Report's GitHub repository (https://github.com/lat9/sales_report/issues/5).
Please note that since it's a Zen Cart core-file involved, it's not likely that I'll be including that change with the plugin ... other than to document the anomaly and your fix.
Turns out, the correction can be made by adding the following block to the bottom of /admin/stats_sales_reports.php's additional CSS block:
<?php
if (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR > '1.5.6') {
?>
#spiffycalendar { left: 10px!important; }
<?php
}
?>
New Zenner
Thanks for the fix carlwhat. I checked most of the places I could remember that use the SpiffyCal (Specials, SaleMaker, Featured Products) and your fix doesn't seem to adversely affect the ability to select a date, however on the Featured Products admin page it does push the calendar off the page to the right, but at least the browser can scroll over to select a date on that one.
I will try lat9's fix instead.
zennedOut
<?php if (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR > '1.5.6') { ?>lat9:
Turns out, the correction can be made by adding the following block to the bottom of /admin/stats_sales_reports.php's additional CSS block:
#spiffycalendar { left: 10px!important; }
<?php } ?>
!important => i hate !important.... almost as much as i hate globals.... but a topic for another day.
i'm going to investigate using datepicker. seems in use for collect info on the admin/product. and is part of the jquery ui library. might be a better solution and would make sense to be consistent through out.
best.
Administrator
carlwhat:
!important => i hate !important.... almost as much as i hate globals.... but a topic for another day.
i'm going to investigate using datepicker. seems in use for collect info on the admin/product. and is part of the jquery ui library. might be a better solution and would make sense to be consistent through out.
best.
Yes, I try to avoid !important, but when it's the only option (other than carving up a core-file:yuck:) ...
New Zenner
Like carlwhat mentioned, I do think using the datepicker from jQuery UI would be better choice at this point.
As this bug is NOT only in your plugin... it affected literary any plugins that use the SpiffyCal.
Even the "E-Mail Archive Manager" face exact same bug problem!
Therefore, it would be best if the Zen Cart's core file and/or the plugins migrated to jQuery's datepicker instead.
(In fact, on my custom form used datepicker already... gotta test it out to see if I can substituted on SpiffyCal codes.)
New Zenner
So many Zen Cart's admin pages are using SpiffyCalendar!
https://i.imgur.com/Qq8TLqZ.png
Sadly, that's not really good calendar to be use anymore.
But, does not Zen Cart already implement Bootstrap?
Then I suppose we can also use the Bootstrap's Datepicker!
https://bootstrap-datepicker.readthedocs.io/en/latest
https://buildmedia.readthedocs.org/media/pdf/bootstrap-datepicker/latest/bootstrap-datepicker.pdf
However, it seems those two datepickers have to be in the "form."
For example, in my custom "Rental Form," I have the following codes for the rental date ranges.
https://i.imgur.com/gbVJvWj.png
In this form, I set the end date based on starting date and starting date must be today or future's dates.
Hence the reasons I have to have hidden fields to check on date values.
<input type="hidden" id="rental_startdate_temp" value="<?php echo isset($_POST['rental_startdate']) ? $_POST['rental_startdate'] : ''; ?>" />
<input type="hidden" id="rental_enddate_temp" value="<?php echo isset($_POST['rental_enddate']) ? $_POST['rental_enddate'] : ''; ?>" />
<label class="inputLabel">Rental Dates:</label>
<div id="two-column">
<div id="left">
<label class="inputLabelA" for="rental_startdate">Delivery</label>
<input type="text" id="rental_startdate" name="rental_startdate" />
</div>
<div id="right">
<label class="inputLabelB" for="rental_enddate">Return</label>
<input type="text" id="rental_enddate" name="rental_enddate" />
</div>
</div>
<br class="clearBoth" />
In a separate JavaScript file...
$(function() {
//Datepicker's on "Rental Starting Date" field.
$( "#rental_startdate" ).datepicker({
minDate: 0,
changeMonth: true,
numberOfMonths: 3,
onSelect: function( selectedDate ) {
$( "#rental_enddate" ).datepicker( "option", "minDate", selectedDate );
$( "#rental_enddate_temp" ).val(selectedDate);
}
});
//Datepicker's on "Rental Ending Date" field.
$( "#rental_enddate" ).datepicker({
minDate: 0,
changeMonth: true,
numberOfMonths: 3,
onSelect: function( selectedDate ) {
$( "#rental_startdate" ).datepicker( "option", "maxDate", selectedDate );
$( "#rental_startdate_temp" ).val(selectedDate);
}
});
// If user had put rental starting date, data will be retrieved from hidden field.
if ($("#rental_startdate_temp").val()!= '') {
var rentStartDateText = $("#rental_startdate_temp").val();
$("#rental_startdate").val(rentStartDateText);
}
// If user had put rental ending date, data will be retrieved from hidden field.
if ($("#rental_enddate_temp").val()!= '') {
var rentEndtDateText = $("#rental_enddate_temp").val();
$("#rental_enddate").val(rentEndtDateText);
}
});
The "Keyword Capturing Dashboard" plugin is also using jQuery's datepicker.
https://i.imgur.com/szb76jT.png
So I am positive that datepicker can be completely replace the SpiffyCalendar.
However, it seems that codes were optimized around it and hence it is not simply just replace SpiffyCalendar into the datepicker one... There has to be some dependencies that possibly have to ensure the replacement is properly done.
Administrator
I've just submitted v3.3.0 of Sales Report to the Zen Cart moderators for review and will post back when it's available for download.
This release contains changes associated with the following GitHub issues:
#5: zc156, calendar displays off-screen
#6: Correct various PHP Notices.
#8: Correct error when specific products/customers indicated, but no list supplied.
#9: Add a setting to exclude orders-status values.
#10: "Remember" the admin's selection for 'Open report in new window'.
#11: Convert javascript to jQuery.
#12: Convert HTML to HTML5.
#13: Use the customer's name from the order, not the customers table.
Administrator
lat9:
I've just submitted v3.3.0 of Sales Report to the Zen Cart moderators for review and will post back when it's available for download.
This release contains changes associated with the following GitHub issues:
#5: zc156, calendar displays off-screen
#6: Correct various PHP Notices.
#8: Correct error when specific products/customers indicated, but no list supplied.
#9: Add a setting to exclude orders-status values.
#10: "Remember" the admin's selection for 'Open report in new window'.
#11: Convert javascript to jQuery.
#12: Convert HTML to HTML5.
#13: Use the customer's name from the order, not the customers table.
Now available for download!
Administrator
Administrator
lat9:
I've just submitted v3.3.1 of Sales Report to the Zen Cart moderators for review; I'll post back here once it's available for download.
This release contains changes associated with the following GitHub issues:#14: Correct PHP 7.3 warning
#15: Correct custom date-range not remembered
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=9
New Zenner
Not sure if I'm just missing something with it, or if the module doesn't support it at all, but I'm trying to get a report listing our top selling products over the course of the past 2 years. As it is, I can go to the Reports->Products Purchased page and it will give me a list of what we've sold, from most to least,ever since we opened, but I'm needing to be able to generate a list for a specific time period, and of a specific selection of product. If this doesn't, is there anything that does?
We're on 1.5.5.
Tell staff why this post should be reviewed.