Guest Posted January 20, 2007 Posted January 20, 2007 Have created a self-refreshing stats popup to check your webshop without having to use the admin interface continually. Would now like to refine by adding the number of customers that are actually logged on. Thus far I have managed quite well, but this time I guess I would have to calculate the number of session_id's that are not "0". Or perhaps look in a table thats obscured to me. Any pointers on which table to use or which variables to calculate would be great! contrib: http://www.oscommerce.com/community/contributions,4811
Guest Posted January 20, 2007 Posted January 20, 2007 How to calculate +1 in logged entries (login.php)? add: tep_session_register('logged_customers"); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "', logged_customers = logged_customers+1"); How to calculate -1 from logged entries (admin/whos_online.php)? // remove entries that have expired tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "', logged_customers = logged_customers-1"); echo logged_customers ?? Any ideas, would this work?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.