Page 88 of 88 FirstFirst ... 3878868788
Results 871 to 879 of 879
  1. #871
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,641
    Plugin Contributions
    11

    Default 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.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  2. #872
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    301
    Plugin Contributions
    7

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

  3. #873
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    301
    Plugin Contributions
    7

    Default Re: Sales report 2.0

    Replacing line 184 from file admin/stats_sales_report2.php
    PHP Code:
    $datepicker_format zen_datepicker_format_fordate(); 
    by
    PHP Code:
    $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.

  4. #874
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,641
    Plugin Contributions
    11

    Default 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
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  5. #875
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    301
    Plugin Contributions
    7

    Default Re: Sales report 2.0

    Quote Originally Posted by dbltoe View Post
    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.

  6. #876
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    301
    Plugin Contributions
    7

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

  7. #877
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    372
    Plugin Contributions
    6

    Default 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
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  8. #878
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,641
    Plugin Contributions
    11

    Default Re: Sales report 2.0

    Quote Originally Posted by OldNGrey View Post
    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.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  9. #879
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    301
    Plugin Contributions
    7

    Default Re: Sales report 2.0

    Quote Originally Posted by dbltoe View Post
    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.

 

 
Page 88 of 88 FirstFirst ... 3878868788

Similar Threads

  1. v139b Sales Report
    By irishshopper in forum General Questions
    Replies: 1
    Last Post: 26 Jan 2014, 01:00 AM
  2. Sales Report
    By jgold723 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Nov 2011, 05:58 PM
  3. Sales report
    By tlahtine in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 27 Dec 2010, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg