Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Customer history for last 10 days error

Customer history for last 10 days error

Views: 1,810

Results 1 to 11 of 11
5 Sep 2010, 12:52 AM
#1
rdsbaker avatar

rdsbaker

New Zenner

Join Date:
Mar 2008
Posts:
91
Plugin Contributions:
0

Customer history for last 10 days error

After upgrade to 1.3.9f, the history on the Admin page will show data from today on all 10 days. Each date will show todays data. Not a biggie but I am annoyed a little that it is not right.:ohmy:

5 Sep 2010, 12:55 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customer history for last 10 days error

PHP version?
MySQL version?
What process did you use to upgrade?
Any errors encountered in upgrade process?
Any warnings during the zc_install database-upgrade steps?

5 Sep 2010, 12:55 AM
#3
rdsbaker avatar

rdsbaker

New Zenner

Join Date:
Mar 2008
Posts:
91
Plugin Contributions:
0

Re: Customer history for last 10 days error

actually, each date is todays date! Each of the 10 slots duplicate todays data

5 Sep 2010, 1:02 AM
#4
rdsbaker avatar

rdsbaker

New Zenner

Join Date:
Mar 2008
Posts:
91
Plugin Contributions:
0

Re: Customer history for last 10 days error

SQL version is 5.1.47 community log
Php version is 5.2.13

Used Simple Scripts to upgrade

yes, had a few probs, but were actually easily solved with help from forum.

warning at upgrade was only that I had not re-named admin folder

5 Sep 2010, 1:10 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customer history for last 10 days error

They (the automated upgrade tool you used) probably broke your counter-history table.
You'll likely have to dump it, losing all the data, and then recreate it again to catch new data correctly.

(We always recommend NOT using automated upgrade tools, since they typically break things badly.)

5 Sep 2010, 1:15 AM
#6
rdsbaker avatar

rdsbaker

New Zenner

Join Date:
Mar 2008
Posts:
91
Plugin Contributions:
0

Re: Customer history for last 10 days error

Ok, what are the steps I need to take to accomplish this?

5 Sep 2010, 8:07 PM
#7
rdsbaker avatar

rdsbaker

New Zenner

Join Date:
Mar 2008
Posts:
91
Plugin Contributions:
0

Re: Customer history for last 10 days error

Again, I ask.....how do I reset counter history?

5 Sep 2010, 9:41 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customer history for last 10 days error

  1. NEVER use an automated upgrade tool again.

  2. Run this via phpMyAdmin:```
    DROP TABLE IF EXISTS counter_history;
    CREATE TABLE counter_history (
    startdate char(8) default NULL,
    counter int(12) default NULL,
    session_counter int(12) default NULL,
    PRIMARY KEY (startdate)
    ) ENGINE=MyISAM;

12 Apr 2011, 7:46 PM
#9
shara avatar

shara

New Zenner

Join Date:
Jul 2005
Location:
Los Angeles
Posts:
50
Plugin Contributions:
0

Re: Customer history for last 10 days error

I just wanted to know if this fixed the problem? I have 3 stores that have been upgraded to 1.3.9f and they all have the same problem.

18 Apr 2011, 3:25 PM
#10
joepixel avatar

joepixel

New Zenner

Join Date:
May 2008
Location:
orlando, florida
Posts:
28
Plugin Contributions:
0

Re: Customer history for last 10 days error

I use Google Analytics for measuring visits, etc. Are there any ramifications if I simply comment out the require(DIR_WS_INCLUDES . 'counter.php'); line in the includes/application_top.php file?

This query is causing issues with locking the database each time it makes a query and is causing MySQL issues. I'm running a lot of other processes on the server and this may help speed things up.

Please let me know if commenting this line would affect anything else that I'm not aware of.

Thank you!

24 Apr 2011, 2:38 PM
#11
joepixel avatar

joepixel

New Zenner

Join Date:
May 2008
Location:
orlando, florida
Posts:
28
Plugin Contributions:
0

Re: Customer history for last 10 days error

In case anyone wants to know. I removed all the SQL queries in the includes/counter.php file and left only the Illegal Access lines (3). This has cause no issues with the cart or any functionality. The reason I did this is because I have a lot of processes running on the server. The counter.php file is loaded each time a page is hit. Each SQL query locks the database until finished. If you have a lot of processes, these queries can get in the way and slow things down. The counter.php file is not needed if you're using something like Google Analytics.