Thread: Supertracker

Page 1 of 2 12 LastLast
Results 1 to 10 of 324

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Posts
    168
    Plugin Contributions
    0

    Default Re: Supertracker

    The error information. It looks like declare the class twice. Do I need change the code to include_once() or require_once() in some where?
    Code:
    PHP Fatal error:  Cannot redeclare class supertracker in H:\zencart15\includes\classes\supertracker.php on line 15

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Supertracker

    do a search for "class supertracker" in your fileset in the frontend of the shop. You probably have a rogue file somewhere where this class is also mentionted it should only be in \includes\classes\supertracker.php

  3. #3
    Join Date
    Oct 2011
    Posts
    168
    Plugin Contributions
    0

    Default Re: Supertracker

    I searched whole site by Xsearch. The "class supertracker" appeared in supertracker.php only.

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

  5. #5
    Join Date
    Oct 2011
    Posts
    168
    Plugin Contributions
    0

    Default Re: Supertracker

    Thanks Design75
    I had uninstalled and re-installed it. The error information was changed as below @#!?
    Code:
    [12-Nov-2012 06:33:39 UTC] PHP Fatal error:  1364:Field 'cart_contents' doesn't have a default value :: INSERT INTO supertracker (ip_address, browser_string, country_code, referrer, referrer_query_string, landing_page, landing_page_name, exit_page, exit_page_name, time_arrived, last_click, products_viewed) VALUES ('127.0.0.1', 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0', '', 'http://www.zencart15.com/index.php', 'main_page=login', '/index.php?main_page=index', 'Home', '/index.php?main_page=index', 'Home', NOW(), NOW(), '') in H:\zencart15\includes\classes\db\mysql\query_factory.php on line 120

  6. #6
    Join Date
    Oct 2011
    Posts
    168
    Plugin Contributions
    0

    Default Re: Supertracker

    base on the configuration of "Excluding IP's", the error message is different.
    If the value set to empty, the error log is
    Code:
    PHP Fatal error:  1364:Field 'cart_contents' doesn't have a default value :: INSERT INTO......
    If the value set to 127.0.0.1, the error log is
    Code:
    PHP Fatal error:  Cannot redeclare class supertracker
    Last edited by su35; 12 Nov 2012 at 08:16 AM.

  7. #7
    Join Date
    Oct 2011
    Posts
    168
    Plugin Contributions
    0

    Default Re: Supertracker

    If the jscript_supertracker.php was deleted, the pages were loading well. But there was no tracking data been recorded.

  8. #8
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Supertracker

    Quote Originally Posted by su35 View Post
    The error information. It looks like declare the class twice. Do I need change the code to include_once() or require_once() in some where?
    Code:
    PHP Fatal error:  Cannot redeclare class supertracker in H:\zencart15\includes\classes\supertracker.php on line 15
    For anyone that gets this error, a workaround that ~seems~ to do the trick is to edit the file:

    /includes/templates/YOUR_TEMPLATE/jscript/jscript_supertracker.php

    and change

    REQUIRE(DIR_WS_CLASSES . 'supertracker.php');

    to

    include_once(DIR_WS_CLASSES . 'supertracker.php');


    This is just a bandage, but is working like a champ for me now.

    Nice Mod by the way.

  9. #9
    Join Date
    Jun 2011
    Posts
    91
    Plugin Contributions
    0

    Default Re: Supertracker

    Quote Originally Posted by Limitless View Post
    For anyone that gets this error, a workaround that ~seems~ to do the trick is to edit the file:

    /includes/templates/YOUR_TEMPLATE/jscript/jscript_supertracker.php

    and change

    REQUIRE(DIR_WS_CLASSES . 'supertracker.php');

    to

    include_once(DIR_WS_CLASSES . 'supertracker.php');


    This is just a bandage, but is working like a champ for me now.

    Nice Mod by the way.

    I applied this workaround and although supertracker is now working, my web pages seem to take a long time to load
    and supertracker no longer displays the country flag for the visitor in the reports section.
    If I don't apply the workaround, supertracker works fine but when you go to my web sit all you get is an "INTERNAL SERVER ERROR"
    I believe this is caused from other java scrip files colliding with each other. Any suggestion on a fix?

  10. #10
    Join Date
    Sep 2009
    Posts
    23
    Plugin Contributions
    0

    Default Re: Supertracker

    I'm moving this discussion over from another support thread (http://www.zen-cart.com/showthread.p...ng-array-given).... I'm using ZC 1.5.1 and PHP 5.3.

    I believe I've found a problem with Supertracker. Specifically it seems to be when a user checks out and Supertracker attempts to write the cart contents to the cart_contents field in the supertracker table. The file that controls this, I believe, is /includes/classes/supertracker.php about line 150ish. You can see that if the cart contents return as a string then it serializes them. But what happens when they don't return as a string? What if they are undefined or an array or some other non-string condition. Since the database write operation depends on zen_db_input() function, which is really just a container for the native add_slashes() function, it causes a PHP warning. Under PHP 5.3 addslashes() now strictly checks to see if the data passed to it is a string. If it isn't it throws a warning which ends up as a myDEBUG log file in the /logs folder under Zen Cart 1.5.1. They start adding up quickly if you have a store with enough daily transactions.

    If I pass this data straight into the db, bypassing addslashes, it writes "Array" at least in my initial couple tests.

    Suggestions on the best way to filter the $carts_content variable so it always ends up a string? I'll try a couple things but just wanted others to weigh in....

    Thanks!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Supertracker
    By enquirer66 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 2 Mar 2011, 08:37 PM
  2. SuperTracker
    By ma.r.a in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 11 Feb 2011, 08:19 PM
  3. Supertracker referrals?
    By mlbacher in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 Aug 2009, 07:53 PM
  4. supertracker mod
    By confused_aswell in forum General Questions
    Replies: 2
    Last Post: 1 Aug 2008, 12:55 PM
  5. Supertracker Add-on
    By bcmartinez in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 19 May 2006, 01:24 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