Guest Stephen Lilly Posted March 16, 2008 Share Posted March 16, 2008 Hi, I would like to add a new column (CustomerIP) to the cubecart_sesions table inorder to record the customers IP address .. Can anyone help with advising the appropiate MySQL command Thank you Stephen Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 17, 2008 Share Posted March 17, 2008 You're not exactly recording the customer's IP address. You are recording the anonymous visitor's IP address in a session state that persists with this visitor's visit, even if that visitor eventually logs in and acquires a customer ID number. (I think.) Even so, CC will delete sessions older than that as specified in the admin settings. And CC records the IP address of the machine used to place an order. There's a third party mod (I think) that displays the IP address as a visitor moves about the store. But, to answer your specific question (without actually having tested this): /includes/session.inc.php, line 87: Here is a group of statements that prepares the associative array $sessData. Add this line after this group: $sessdata["visitorIP"] = $_SERVER['REMOTE_ADDR']; Be sure there's a field in the CubeCart_sessions table called 'visitorIP'. Now, the next obvious question is, where do you want to display this information? Quote Link to comment Share on other sites More sharing options...
Guest Stephen Lilly Posted March 17, 2008 Share Posted March 17, 2008 Hi Thank you for your reply... I am trying to understand how to add an extra column in the sessions table to temporally add the visitor information... This would then be displayed on the Stats page I belive the SQL cmd is something like ALTER TABLE cubecart_sessions, followed by ADD CistomerIP....however this just produces an error Thank you Stephen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.