Anyone still using this?
It seems that the display of the graph needs updating and it's causing errors.
Printable View
Anyone still using this?
It seems that the display of the graph needs updating and it's causing errors.
Google retired the jsapi that it was leveraging to display graphs.
If you're using 1.03 of the module, then in the graphs file:
must be replaced withCode:<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
//<=!=[=C=D=A=T=A=[
google.load("jquery", "1");
//]=]=>
</script>
andCode:<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
must be replaced withCode:google.load('visualization', '1');
google.setOnLoadCallback(drawVisualization);
Code:google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(drawVisualization);
I wrapped the query fixes and the charting api fixes into a new 1.04 release, which has been submitted to the plugins area.
Unfortunately I don't have a codetrio account with which to test the changes, so apologies if it contains other errors!
For Zen Cart versions other than 1.5.1-to-1.5.4 for installing this to new sites you'll have to manually apply the "index.php" changes to the index_dashboard.php file.
Thanks for your help DrByte :smile:
No Code Trio account is needed for this, they are just the developers of it I believe.
2 errors still being thrown up
and an onclick errorCode:Uncaught ReferenceError: $ is not defined
:(Code:Uncaught ReferenceError: $ is not defined
at setGraphSource (index.php:405)
at HTMLInputElement.onclick (index.php:337)
Hmm.
I forgot that older Zen Cart versions don't automatically load jQuery. I updated my earlier post to include that.
I also found that sometimes the HTML div id of "graph" that this uses may clash with other graphs already on the page. So I've changed it to "ctgraph" in the two places it is needed.
I also found some function calls to an old PHP function "split" that I've updated to "preg_split".
These changes are now in 1.05 which is now in the plugins area.
Thats fixed it, thank you! :smile: