Forums / Addon Admin Tools / Sales report 2.0

Sales report 2.0

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

Results 861 to 880 of 882
13 May 2024, 10:01 PM
#861
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
126
Plugin Contributions:
0

Sales report 2.0

swguy:

The results are at the bottom below the selection part of the screen.
If you don't want a new window, you can check a box at the bottom ("open results in new window?") and the original window will update in place.
Sorry for the confusion.
I mean when it opens a new window, it doesn't show the results, but just another configuration page like this:Attachment 20609

13 May 2024, 10:39 PM
#862
lat9 avatar

lat9

Administrator

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

Re: Sales report 2.0

That looks like a "partial white-page", implying that there might be a PHP log indicating what the underlying issue is.

13 May 2024, 11:24 PM
#863
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
126
Plugin Contributions:
0

Re: Sales report 2.0

lat9:

That looks like a "partial white-page", implying that there might be a PHP log indicating what the underlying issue is.

My bad.
I'm familiar with the old version of Sales Report with ZC v1.3.9, and I don't notice that the new Sales Report II shows the configuration parts above the result. When I scroll down, I see the results.

14 May 2024, 12:48 PM
#864
lat9 avatar

lat9

Administrator

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

Re: Sales report 2.0

siliconbug:

My bad.
I'm familiar with the old version of Sales Report with ZC v1.3.9, and I don't notice that the new Sales Report II shows the configuration parts above the result. When I scroll down, I see the results.
Oops! Sorry about that user-interface change and thanks for reporting back your findings.

1 Jun 2024, 1:03 PM
#865
lat9 avatar

lat9

Administrator

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

Re: Sales report 2.0

v4.0.1 of the Sales Report is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=9

This version corrects the HTML class name (see issue #44) for one of the report's columns.

27 Nov 2024, 11:06 AM
#866
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,754
Plugin Contributions:
56

Re: Sales report 2.0

Release 4.0.1 also corrects the missing product name column in the matrix report. (admin/stats_sales_report2.php line 1597-1599)
Thanks for this update!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

2 Jan 2025, 5:23 PM
#867
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,754
Plugin Contributions:
56

Re: Sales report 2.0

In some cases, when the local sales tax mod is used, sales report shows double the tax collected in the Goods Tax column. Working on tracking this down.
(Latest Sales Report, Latest Zen Cart, PHP 8.3, but this bug was also present in the older non-encapsulated Sales Report.)

** Update: sorry, this is a bug in Local Sales Tax - Sales Report is correctly reporting what's in the orders_products.products_tax column, but that amount is incorrectly doubled.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

18 Mar 2025, 3:03 PM
#868
lat9 avatar

lat9

Administrator

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

Re: Sales report 2.0

v4.0.2 of Sales Report II is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=9

This release contains changes associated with the following GitHub issues:

#47: Correct layout (and enabling method) for the display of each order's delivery country/state.
#50: The report now includes an order only on its first transition to a chosen order-status value.
#54: Correct PHP Warnings issued for timeframe report output to a CSV.

31 Aug 2025, 10:01 AM
#869
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Sales report 2.0

Just installed this on my 2.1 dev site and I see the double tax on shipping for stores with included tax is still occurring.

Is this fixable?

19 Jan 2026, 1:59 AM
#870
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,900
Plugin Contributions:
22

Re: Sales report 2.0

In testing using 4.0.3 with PHP 8.2 and ZC 2.2.0-alpha, no matter what date is selected, the report date is nowhere near correct. Wondering if there may have been some datepicker changes since 2.1.0 that are causing this.

In Section 1, select Last Month and nothing more in the entire block

In Section 2, set Timeframe to Monthly, Displayed Information to Product Line Items, Sort Products By... to Product Name, and Then Sort By,,, to Model

In Section 3, just click on the Show me the money button.

Scroll down the new page and look at the date. Mine reads 12-Jan.-25 to 12-Jan.25. It should be 1-Jan.25 to 31-Jan.-25

It correctly shows the information for 12-Jan.-25, but should be showing the whole month.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Jan 2026, 8:03 AM
#871
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Sales report 2.0

No need to set anything in particular, I got the same problem/result with any setting, although on version 4.0.2 and 4.0.3 of the plugin on a ZC v2.2.0.

I was able to track down the problem to line 142 of admin/includes/classes/sales_report2.php where strtotime($ed . '00:00:00') fails.
$ed is set to today's date like this: '01-19-2026'. I hoppefully remembered that strtotime uses / as a separator to be able to distinguish between day-moth-year and month/day/year formats. I could not find where it is in PHP doc but few tests with PHP in command line confirmed that.
For English american dates it should use / as a separetor.

In the plugin, the $sd and $ed format is herited from the ZC constant DATE_FORMAT_DATE_PICKER which uses - as separetor as it is what the datepicker requires. This constant is used to define multiple php variables and I am not sure yet what should be modified or not.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

19 Jan 2026, 10:28 AM
#872
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Sales report 2.0

Replacing line 184 from file admin/stats_sales_report2.php

$datepicker_format = zen_datepicker_format_fordate();

by

$datepicker_format = DATE_FORMAT;

seems to fix the problem.
$datepicker_format variable is not actually used for the date picker when doing a custom search. Perhaps it should be renamed.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

19 Jan 2026, 6:20 PM
#873
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,900
Plugin Contributions:
22

Re: Sales report 2.0

That fixed the date problem with a standard selection. Choosing a custom date range still has the same problem as the date picker is inserting the date with a - versus a /. Custom looks to be set to use $datepicker_format, but I still get the dashes.

Using the same data as above, the online results are correct using a set date selection.

The PDF has two initial blank pages. All other items are correct.

The CSV is correct.

Selecting Last Year only results in January

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

21 Jan 2026, 8:13 AM
#874
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Sales report 2.0

dbltoe:

That fixed the date problem with a standard selection. Choosing a custom date range still has the same problem as the date picker is inserting the date with a - versus a /. Custom looks to be set to use $datepicker_format, but I still get the dashes.

Using the same data as above, the online results are correct using a set date selection.

The PDF has two initial blank pages. All other items are correct.

The CSV is correct.

Selecting Last Year only results in January

Yes, there are some other problems. I think I fixed them all, for v4.0.3. with ZC v2.2.0 at least I will make a PR on GitHub soon.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

21 Jan 2026, 2:05 PM
#875
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Sales report 2.0

OK, I made a PR on GitHub here.
You can see in detail what I modified to make it work.
Please test it. It is for v4.0.3 on ZC v2.2.0.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

22 Jan 2026, 1:59 AM
#876
oldngrey avatar

oldngrey

Zen Follower

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

Re: Sales report 2.0

Nice work. With zc2.2.0 alpha I haven't detected any errors and all dates comply with my site settings.

OldNGrey
ZC222 PHP 8.4.27
MySQL 11.8.5-MariaDB

24 Jan 2026, 3:24 AM
#877
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,900
Plugin Contributions:
22

Re: Sales report 2.0

OldNGrey:

I haven't detected any errors and all dates comply with my site settings.

Where I had the problem was setting a custom date. The beginning date can not be set with the pop-up as it always shows 2026 unless you manually enter a different year. Everything else is working fine.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

24 Jan 2026, 6:31 AM
#878
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Sales report 2.0

dbltoe:

Where I had the problem was setting a custom date. The beginning date can not be set with the pop-up as it always shows 2026 unless you manually enter a different year. Everything else is working fine.

I am not sure to understand your problem. What you call the Popup is the Datepicker calendar popup I suppose. You should be able to select the year there except if it has been configure to not allow past dates in the DatePicker JavaScript definition (with minDate) at the end of file stats_sales_report2.php before the </body> tag.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

26 Mar 2026, 10:34 PM
#879
chartwell avatar

chartwell

New Zenner

Join Date:
Apr 2007
Posts:
3
Plugin Contributions:
0

Re: Sales report 2.0

Anyone know how we could make the sales report show all data without breaking it up annually when the date selection is longer than a year?

27 Mar 2026, 12:05 AM
#880
lat9 avatar

lat9

Administrator

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

Re: Sales report 2.0

chartwell:

Anyone know how we could make the sales report show all data without breaking it up annually when the date selection is longer than a year?
That would take some "serious" rewriting, since the report has always provided values in a timeframe basis.