Page 74 of 86 FirstFirst ... 2464727374757684 ... LastLast
Results 731 to 740 of 859
  1. #731
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Sales report 2.0

    Quote Originally Posted by Dave224 View Post
    Installed Sales Report v3.2.0 in zc155e. PHP version 5.6.31. I'm getting a PHP warning for a null array argument in in_array. Error message follows:

    Existing out-of-the-box code is:
    Code:
                // check to see if product is unique in this timeframe
                // add to 'diff_products' array if so
                if (!in_array($pID, $this->timeframe[$id]['total']['diff_products'])) {
                    $this->timeframe[$id]['total']['diff_products'][] = $pID;
                }
    
                if (!in_array($pID, $this->timeframe[$id]['orders'][$oID]['diff_products'])) {
                    $this->timeframe[$id]['orders'][$oID]['diff_products'][] = $pID;
                }
    Should the code be something like this?
    Code:
                // check to see if product is unique in this timeframe
                // add to 'diff_products' array if so
                if (!in_array($pID, $this->timeframe[$id]['total']['diff_products'])) {
                    $this->timeframe[$id]['total']['diff_products'][] = $pID;
                }
    
                if (is_null($this->timeframe[$id]['orders'][$oID]['diff_products']) || !in_array($pID, $this->timeframe[$id]['orders'][$oID]['diff_products'])) {
                    $this->timeframe[$id]['orders'][$oID]['diff_products'][] = $pID;
                }
    Should a similar change be made to the if clause above the modified one?

    Thanks!
    I had same php warning in logs. Report still worked correctly, just produced the log error. I trid the code change as above and now no error is logged when I generate a report. Thanks for posting.

  2. #732
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: Sales report 2.0

    Hi,

    When running the report I get the following error:
    [10-Jun-2018 07:03:53 UTC] Request URI: /admin/stats_sales_report.php?start_date=01%2F06%2F2017&end_date=10+%2F06%2F2017&date_t arget=purchased&date_status=1&prod_includes=&cust_includes=&payment_method=&paym ent_method_omit=&current_status=&manufacturer=0&timeframe=year&timeframe_sort=as c&detail_level=order&li_sort_a=oID&li_sort_order_a=asc&li_sort_b=oID&li_sort_ord er_b=asc&output_format=display&new_window=1, IP address: *.*.123.202
    #1 mktime() called at [/.../.../admin/includes/classes/sales_report.php:69]
    #2 sales_report->__construct() called at [/.../admin/stats_sales_report.php:245]

    [10-Jun-2018 07:03:53 UTC] PHP Warning: mktime() expects parameter 4 to be integer, string given in /.../.../admin/includes/classes/sales_report.php on line 69
    Zen Cart 1.5.5f
    PHP Version 7.1.18

    Could someone point me in the right direction to fix this please?

  3. #733
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    red flag Re: Sales report 2.0

    Why do I get extended information under "Time Frame" i.e:
    IST0JanE_Tue0st+05:300AM2019_TueAM2019

    Zencart Ver 1.5.6a
    Php 7

    Thanks

  4. #734
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Re: Sales report 2.0

    Quote Originally Posted by harry2cool View Post
    Why do I get extended information under "Time Frame" i.e:
    IST0JanE_Tue0st+05:300AM2019_TueAM2019

    Zencart Ver 1.5.6a
    Php 7

    Thanks
    in the file
    YOUR_ADMIN\includes\classes\sales_report.php
    at the top of the file at approx line 29 define the date format you use eg

    define('DATE_FORMAT', 'd/m/Y'); // this is used for date() // addition for PHP 7

    Change the comments at the end of the line to your standard for comments

  5. #735
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Re: Sales report 2.0

    If using PHP 7.3 the following changes will be required. In the file

    YOUR_ADMIN\includes\classes\sales_report.php

    for compliance with PHP 7.3 change "continue;" to "continue 2;" at approx line 1000,
    for compliance with PHP 7.3 change "continue;" to "continue 3;" at approx line 1014

    Always perform changes in a test environment and back up before making changes

  6. #736
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    Default Re: Sales report 2.0

    We have tried everything, however it's a strange server issue, because on our other website with the newer version the Timeframes show properly.
    Any server/php int changes suggested for this particular website ?
    This is what I get under TimeFrame column:
    The date is not shown;
    ==============
    IST0JanE_Tue0st+05:300AM2019_TueAM2019
    IST0JanE_Wed0nd+05:300AM2019_WedAM2019
    IST0JanE_Thu0rd+05:300AM2019_ThuAM2019
    IST0JanE_Fri0th+05:300AM2019_FriAM2019
    IST0JanE_Sat0th+05:300AM2019_SatAM2019
    IST0JanE_Sun0th+05:300AM2019_SunAM2019
    IST0JanE_Mon0th+05:300AM2019_MonAM2019
    IST0JanE_Tue0th+05:300AM2019_TueAM2019
    IST0JanE_Wed0th+05:300AM2019_WedAM2019
    IST0JanE_Thu0th+05:300AM2019_ThuAM2019
    IST0JanE_Fri0th+05:300AM2019_FriAM2019
    IST0JanE_Sat0th+05:300AM2019_SatAM2019
    IST0JanE_Sun0th+05:300AM2019_SunAM2019
    IST0JanE_Mon0th+05:300AM2019_MonAM2019
    IST0JanE_Tue0th+05:300AM2019_TueAM2019
    IST0JanE_Wed0th+05:300AM2019_WedAM2019
    IST0JanE_Thu0th+05:300AM2019_ThuAM2019
    IST0JanE_Fri0th+05:300AM2019_FriAM2019
    IST0JanE_Sat0th+05:300AM2019_SatAM2019
    IST0JanE_Sun0th+05:300AM2019_SunAM2019
    IST0JanE_Mon0st+05:300AM2019_MonAM2019
    IST0JanE_Tue0nd+05:300AM2019_TueAM2019
    IST0JanE_Wed0rd+05:300AM2019_WedAM2019
    IST0JanE_Thu0th+05:300AM2019_ThuAM2019
    IST0JanE_Fri0th+05:300AM2019_FriAM2019

  7. #737
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    red flag Re: Sales report 2.0

    Got below on the logs:

    ===========
    [25-Jan-2019 22:34:59 Asia/Kolkata] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/harry2co/public_html/admin/includes/classes/sales_report.php on line 403
    [25-Jan-2019 22:34:59 Asia/Kolkata] Request URI: /adminname/stats_sales_report.php?date_preset=this_month&start_date=&end_date=&date_target= purchased&date_status=1&prod_includes=&cust_includes=&payment_method=&payment_me thod_omit=&current_status=&manufacturer=0&timeframe=day&timeframe_sort=asc&detai l_level=timeframe&li_sort_order_a=asc&li_sort_order_b=asc&output_format=display, IP address: xxx.yy.26.190
    #1 in_array() called at [/home/harry2co/public_html/adminname/includes/classes/sales_report.php:403]
    #2 sales_report->build_li_totals() called at [/home/harry2co/public_html/adminname/includes/classes/sales_report.php:259]
    #3 sales_report->build_timeframe() called at [/home/harry2co/public_html/adminname/includes/classes/sales_report.php:107]
    #4 sales_report->__construct() called at [/home/harry2co/public_html/adminname/stats_sales_report.php:245]
    ================
    Please guide.
    Thanks

  8. #738
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Re: Sales report 2.0

    Please list the Zen cart version and PHP version and version of Sale Report you are using to test this.

  9. #739
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    Default Re: Sales report 2.0

    Zencart Ver 1.5.6a
    Php 7

  10. #740
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Re: Sales report 2.0

    PHP7.3
    Ignore the line about continue 3 in post #735 https://www.zen-cart.com/showthread....73#post1354173. Only the continue 2 is required
    Last edited by OldNGrey; 26 Jan 2019 at 07:19 AM. Reason: Incorrect information

 

 
Page 74 of 86 FirstFirst ... 2464727374757684 ... LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR