Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default reset date on admin hit counter

    in the admin home page there is a hit couter in the stats page.

    Hit Counter Started: 08/03/2007
    Hit Counter: 8866

    looks like that. how can i reset this to 0 and a new start date???

  2. #2
    Join Date
    Sep 2007
    Location
    Somewhere in Southern Cal
    Posts
    330
    Plugin Contributions
    0

    Default Re: admin hit counter

    Hello kitcorsa:
    if you go to:
    admin/tools/store Manager you can reset the counter to what ever number you want. ie Update Counter
    As for the date I don't know if there is a way to do that. You might be able write a sql patch and do it that way, or even go into the db.

    Remember to back up your db (database) before you attempt any updates.

    nomad

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: admin hit counter

    im sure there must be a way as it wouldn't be there if there wasn't!!

    i saw that counter update thing on the admin section when clearing admin records etc but didn't want to do out withit without knowing what im doing!

  4. #4
    Join Date
    Jul 2010
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion Re: admin hit counter

    Quote Originally Posted by kitcorsa View Post
    in the admin home page there is a hit couter in the stats page.

    Hit Counter Started: 08/03/2007
    Hit Counter: 8866

    looks like that. how can i reset this to 0 and a new start date???
    I'm assuming that given this post was made over two years ago, you've either found a solution or have given up trying to find one.

    Just for the record for those who stumble across this thread as I have, you'll need to issue an SQL query to adjust a field in the "counter" table of your database.

    The counter table contains just one row, with these two columns:
    startdate - counter start date in the format YYYYMMDD
    counter - the actual hit count

    Knowing that, then, modifications are relatively straightforward to enter via "Admin->Tools->Install SQL Patches" -

    To set the counter to zero:
    Code:
    UPDATE counter SET counter=0 WHERE 1=1;
    To set the date to today's date (assuming today's date is the 9th of July 2010 - change as appropriate for your needs):
    Code:
    UPDATE counter SET startdate='20100709' WHERE 1=1;
    To both set the date and zero the counter:
    Code:
    UPDATE counter SET startdate='20100709', counter=0 WHERE 1=1;
    In case you're wondering why there's a "WHERE 1=1" condition at the end of each line, it's because the SQL UPDATE clause requires a condition. Normally it'd specify a particular row or range of rows to act upon, but in this instance we simply need something which'll always be true.


    - Bob.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reset date on admin hit counter

    You could go to the Tools ... Store Manager ... and use the reset in there:
    Update Counter
    to to a new value:
    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!

  6. #6
    Join Date
    Jul 2010
    Posts
    2
    Plugin Contributions
    0

    Have a Drink Re: reset date on admin hit counter

    Quote Originally Posted by Ajeh View Post
    You could go to the Tools ... Store Manager ... and use the reset in there:
    True, Linda, but that doesn't address the issue of resetting the counter start date.

    Most (if not all) Zen Cart sites spend quite a bit of time in development and testing, and most administrators would prefer to set the counter start date to the date of the actual site launch, rather than the date on which development started.

    Perhaps something to add to the wish list for a future version of Zen Cart? A settable "counter start date" field on the backend Store Manager page?

    - Bob.

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reset date on admin hit counter

    All of the information is store in the database tables:
    counter
    counter_history

    You could empty the tables in phpMyAdmin if updating the counter is not enough ...
    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!

 

 

Similar Threads

  1. v150 Reset Date for Hit Counter Started
    By iceni11 in forum Basic Configuration
    Replies: 3
    Last Post: 9 Jun 2012, 03:47 AM
  2. reset date on hit counter
    By Astarkley in forum General Questions
    Replies: 9
    Last Post: 18 Dec 2009, 08:00 PM
  3. How do you reset hit counter date?
    By JHouse in forum General Questions
    Replies: 1
    Last Post: 18 Dec 2009, 03:05 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