Forums / Bug Reports / [Cannot duplicate] Hit Counter Is Skewed By Adding Products

[Cannot duplicate] Hit Counter Is Skewed By Adding Products

Locked

Started by jfreeman on 9 Dec 2010, 5:38 PM · Views: 1,048

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
9 Dec 2010, 5:38 PM
#1
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

[Cannot duplicate] Hit Counter Is Skewed By Adding Products

There is a problem with Hit Counter - the counts are skewed as you are adding products. Each time you add a product the counter goes up by one which doesn't help when you keep track of hits from prospects or customers.

I couldn't find anyone reporting this problem so hopefully this is the only report.

9 Dec 2010, 6:08 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

You could customize the counter.php by surrounding the code in something like:

if (!in_array($_GET['main_page'], array(FILENAME_SHOPPING_CART))) {
// code here
}

then when the page is the shopping_cart the counter will not count ...

This would stop the counter for add to cart from anywhere that the add to cart goes to the shopping_cart as well as updates to the shopping_cart page when looking at it ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Dec 2010, 6:21 PM
#3
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

Hi Linda,

I didn't make my report clear - what I meant to say was as you "the Admin" is adding products to your ZenCart database - the Hit Counter (as though someone had visited your site) increments as you "add a product to the ZenCart Database" not the shopping cart. But thank you for replying - it was my error in not clearly stating the problem. :oops:

9 Dec 2010, 6:54 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

Spookie ... :eek:

The counter doesn't count when you are in the Admin ...

Did you change something on your site that might be calling it?

One thing you can do is go to the Tools ... Developers Tool Kit ... and do a search on:
counter.php

and see what files are calling it? :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Dec 2010, 8:17 PM
#5
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

Do this to see what I am talking about.

  1. Go to Amin Home
  2. Write Down Hit Counter Number
  3. Add a Product
  4. Go to Admin Home
  5. Note: The Hit Counter increments by 1 after you add the product
9 Dec 2010, 8:23 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

I am trying to get you to used the Developers Tool Kit to see what files are calling or triggering the counter.php as this is not used by the Admin ...

If your counter is being triggered, then something has changed in your site to call code that is designed to be used just by the store and not by the admin at all ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Dec 2010, 8:59 PM
#7
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

Hi there - this is what came up after the search:

Searching 2403 files ... for: counter.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/application_top.php

Line #157 : require(DIR_WS_INCLUDES . 'counter.php');

/home/content/v/i/n/vintagemusic/html/zencollections/includes/counter.php

Line #2 : * counter.php

Line #8 : * @version $Id: counter.php 16091 2010-04-27 21:46:02Z wilt $

Match Lines found: 3

9 Dec 2010, 10:29 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

I am not sure what to tell you here ... those are correct for the store calculating the counter hits ...

I cannot reproduce this problem ...

What version Zen Cart?

Clean install or an Upgrade?

What Add Ons?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Dec 2010, 4:24 PM
#9
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: [Cannot duplicate] Hit Counter Is Skewed By Adding Products

I khow strange isn't it. I'm using the lastest .f and I upgraded.