Category: X-Cart Tutorials
Posted: Feb 2, 2010
Synopsis: X-Cart's "Who's Online" is commonly considered in-accurate. This posting allows you to increase or decrease the accuracy of this x-cart feature.
X-Cart's "Who's Online" feature is commonly considered "in-accurate" because it records all users who open a page with a 30-minute time period. This time frame can be reduced to make the module more accurate, or extended to create the "illusion" of a busier store, with the following code changes provided by Eugene on the x-cart forums:
How to make this x-cart module more accurate:
Open
modules/Users_online/registered_user.phpFind:$expiry_time = $curtime + $config["Sessions"]["session_length"];
Replace with:
$expiry_time = $curtime + 300; // 5 minutes instead of default session length
How to make this x-cart module less accurate:
Open
modules/Users_online/registered_user.phpFind:$expiry_time = $curtime + $config["Sessions"]["session_length"];
Replace with:
$expiry_time = $curtime + 3600; // 60 minutes instead of default session length