Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jQuery/Ajax Advanced Statistics for osCommerce 2.3


Dr. Rolex

Recommended Posts

 

@@discxpress

 

You might as well check so that you have the correct timezone configured, Find this

    $json_array = array();
    $row        = 0;

Replace with

    $json_array = array();
    $row        = 0;
    prettify( date_default_timezone_get(), '0 Timezone: ' );

Hello,

 

The timezone "America/New York" is correct. I'm in the state of Georgia.

 

Thanks

Link to comment
Share on other sites

Hello,

 

The timezone "America/New York" is correct. I'm in the state of Georgia.

 

Thanks

 

I'm sorry Lecarl, but I think that it's time for you to pay someone to look into this problem for you.

 

I mean, I don't think there is anything wrong with the code and nobody else is getting the same or similar error that you're getting.

It shouldn't be more than an hour for an experienced programmer to fix whatever weird problem you managed to entangle yourself in.

  

And to be honest, if it was my shop that produced this kind of problem, I would make sure to get to the bottom of it ASAP so it doesn't produce any mysterious errors in the future.

I had a minor bug that f*cked up my order totals a couple of years ago and it was a pain to correct retrospectively. Though, I think the American IRS are more friendly than my tax office, so perhaps it's nothing to worry about ...

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I've just recently downloaded this report and it seems that it fill my needs but I have found three errors that prevent me from using it:

 

1. I am trying to use the product filter. Whenever I do I get a "Invalid JSON response" error that send me to this address: "http://datatables.net/manual/tech-notes/1"

2. If I try to get a child table, with the same filter or if i tried to get the column products sold, I get this error message "DataTables warning: table id={id} - Requested unknown parameter '{parameter}' for row{row-index}

" for which the values changes based on the filter.

3. The report is doubled, as in it calculates twice the sales amount.

 

These errors are not present when I just call the default report, but I need the filtered one. Do you have a fix?

Link to comment
Share on other sites

Hello,

 

I've just recently downloaded this report and it seems that it fill my needs but I have found three errors that prevent me from using it:

 

1. I am trying to use the product filter. Whenever I do I get a "Invalid JSON response" error that send me to this address: "http://datatables.net/manual/tech-notes/1"

2. If I try to get a child table, with the same filter or if i tried to get the column products sold, I get this error message "DataTables warning: table id={id} - Requested unknown parameter '{parameter}' for row{row-index}

" for which the values changes based on the filter.

3. The report is doubled, as in it calculates twice the sales amount.

 

These errors are not present when I just call the default report, but I need the filtered one. Do you have a fix?

 

 

Hello Larry,

 

I do remember something about that issue with DataTables warning: table id={id} - Requested unknown parameter '{parameter}' for row{row-index}

 

I think it occurs when there is an unequal number of table columns vs. fields in the JSON response. Check the network tab in your browser developer tools and look for how many fields each row in the JSON response have, then check your table for how many columns it have or run this in your console

$( "#dataTable" ).find( ">thead th" ).length

They should match, if they doesn't match try with adding/removing one table column to see if that helps.

 

Right now I'm working on my order handler Add-On, when I'm done with that one I'll see if I can give you some more help with this.

Link to comment
Share on other sites

  • 2 months later...

Hi

I've just installed this module (on a modified 2.3.4+Bootstrap Gold) and I have to say it's a fantastic piece of work. Easy to install, looks spiffy, loads of features, and significantly higher code quality than the majority of OSC modules! Thankyou so much for all the work that's gone into it.

 

I have a couple of minor bugs to report.

 

The first one is with the Customer filter, which fails with the following error in the Apache log:

PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /var/www/hht/hhtadmin/advanced_statistics/ajax_request.php on line 93

 

Looking at the documentation for that function at http://php.net/manual/en/mysqli-stmt.get-result.php, it says it's only available with mysqlnd. Since you claim at the top of this thread that mysqlnd should not be required, does this need rewriting to use a different method? Or is mysqlnd essential for this to work? I'm using PHP 5.4.
 

The second concerns the menubar. At the moment, only the leftmost icon (which keeps changing - presumably this is intentional but it makes it harder to describe to users what they should be looking for) has a decent tooltip describing what it does. The rightmost one (which is showing as an "unknown character" glyph on my system) also has a tooltip but it is needlessly tall and narrow: see attached screenshot. The other three icons are not showing tooltips at all, thus they have no explanation what they do.

And one further suggestion: It took me a while to figure out how to close the filter sidebar (by clicking outside it), so how about adding a Close button inside it just to avoid any frustration.

 

Thanks again for your excellent work.

 

post-335110-0-43709900-1452114682_thumb.png

Link to comment
Share on other sites

Oh yes, one more thing. When a date range filter is in effect, it would be great if it would apply to the sub-tables that unfold as well as to the main table.

For example, if I set a date range of say 1st-7th May 2015, then I get only the May 2015 line in the main table which is correct, but if I then click the (+) button, the expanded table shows the sales figures for every day in May, whereas I would expect it to only show the sales for the 1st-7th.

The other filters *do* seem to be applied to the expanded view, just not the date filter.

 

Link to comment
Share on other sites

  • 6 years later...

Anyone get this cool add-on to work in PHP8?  I almost have it working but I get the following error upon initial page load.

 

"DataTables warning: table id=dataTable - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

  • 1 year later...
On 5/12/2022 at 11:28 PM, Smoky Barnable said:

Anyone get this cool add-on to work in PHP8?  I almost have it working but I get the following error upon initial page load.

 

"DataTables warning: table id=dataTable - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"

Finally got this working with PHP 8. The issue was the JSON response was being corrupted with PHP undefined array key warnings.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...