Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / "Products Viewed" stats have stopped updating

"Products Viewed" stats have stopped updating

Locked

Started by schwimwastaken on 30 Apr 2007, 9:22 PM · Views: 1,231

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
30 Apr 2007, 9:22 PM
#1
schwimwastaken avatar

schwimwastaken

New Zenner

Join Date:
Aug 2005
Posts:
88
Plugin Contributions:
0

Post #1 by schwimwastaken

Howdy,

A client contacted us today and let us know that the "products viewed stats have stopped updating. I went to the stats page and clicked one of the products on the page. On stats page refresh, no numbers updated.

Either it's been broken or the stats don't update in real time.

If it's broken, could someone tell me where this code is usually located?

If it's not immediately updated, that would be nice to know too ;)

thanks,
json

1 May 2007, 12:06 AM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

They are updated in real time.
/includes/modules/pages/product_info/main_template_vars.php

    $sql = "update " . TABLE_PRODUCTS_DESCRIPTION . "
            set        products_viewed = products_viewed+1
            where      products_id = '" . (int)$_GET['products_id'] . "'
            and        language_id = '" . (int)$_SESSION['languages_id'] . "'";

    $res = $db->Execute($sql);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.