Forums / Addon Admin Tools / Sales report 2.0

Sales report 2.0

Started by blindside on 29 Aug 2006, 2:41 AM · Views: 248,187

Results 741 to 760 of 882
26 Jan 2019, 7:39 PM
#741
harry2cool avatar

harry2cool

Zen Follower

Join Date:
Oct 2005
Posts:
280
Plugin Contributions:
0

Sales report 2.0


will try and get back.
Thanks

26 Jan 2019, 7:47 PM
#742
harry2cool avatar

harry2cool

Zen Follower

Join Date:
Oct 2005
Posts:
280
Plugin Contributions:
0

Re: Sales report 2.0

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

15 Feb 2019, 11:56 PM
#743
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
433
Plugin Contributions:
0

Re: Sales report 2.0

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

16 Feb 2019, 1:19 PM
#745
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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

26 Feb 2019, 6:17 PM
#746
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

v3.2.1 of Sales Report is now available for download (thanks, @swguy!).

8 Mar 2019, 3:02 PM
#747
gwynwyffar avatar

gwynwyffar

New Zenner

Join Date:
Dec 2006
Location:
Hudson Valley, New York USA
Posts:
93
Plugin Contributions:
0

Re: Sales report 2.0

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]

8 Mar 2019, 4:17 PM
#748
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Sales report 2.0

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.1

Tested 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:

  • 250

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;

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

8 Mar 2019, 7:04 PM
#749
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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.

8 Mar 2019, 7:37 PM
#750
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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
}
?>
8 Mar 2019, 7:39 PM
#751
gwynwyffar avatar

gwynwyffar

New Zenner

Join Date:
Dec 2006
Location:
Hudson Valley, New York USA
Posts:
93
Plugin Contributions:
0

Re: Sales report 2.0

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.

8 Mar 2019, 9:31 PM
#752
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Sales report 2.0

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:

<?php if (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR > '1.5.6') { ?>

#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.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

8 Mar 2019, 10:52 PM
#753
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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:) ...

18 Apr 2019, 4:24 PM
#754
panzc2020 avatar

panzc2020

New Zenner

Join Date:
May 2014
Posts:
68
Plugin Contributions:
0

Re: Sales report 2.0

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.)

18 Apr 2019, 6:45 PM
#755
panzc2020 avatar

panzc2020

New Zenner

Join Date:
May 2014
Posts:
68
Plugin Contributions:
0

Re: Sales report 2.0

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.

3 Jul 2019, 7:21 PM
#756
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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.

6 Jul 2019, 3:17 PM
#757
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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!

25 Aug 2019, 12:16 PM
#758
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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

4 Sep 2019, 12:50 PM
#759
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,139
Plugin Contributions:
56

Re: Sales report 2.0

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

21 Oct 2019, 9:47 PM
#760
lordzoabar avatar

lordzoabar

New Zenner

Join Date:
Nov 2017
Location:
Athens, Georgia, USA
Posts:
104
Plugin Contributions:
0

Re: Sales report 2.0

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.