shotputty Posted December 15, 2008 Share Posted December 15, 2008 (edited) Hi, I installed this on our shop (3.5.4) we're using MS2 and it works perfectly ... i tried installing it on another site using RC2 ... however when someone adds something to their cart it wont show up ... i checked the configure files and they both have the same STORE_SESSIONS location (mysql) ... is there anything else I can check? Cheers Same problem here, seems to be something wrong, so i checked this with var_dump(get_defined_vars()) ; Then you can see that people actually have something in their cart! So I managed to work around it and by using some objects i wrote a piece of code that does it for me: (VERY UGLY CODE THOUGH) just after: $cart = $_SESSION['cart']; $currency = $_SESSION['currency']; I did this: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = 15; $i < $n; $i++) { if ($cart->contents[$i]['qty'] > 0) { if ($i == 7) { $productnaam = 'name1' ; } if ($i == 8) { $productnaam = 'name2' ; } if ($i == 9) { $productnaam = 'name3' ; } if ($i == 10) { $productnaam = 'name4' ; } $contents[] = array('text' => $cart->contents[$i]['qty'] . ' x ' . $productnaam ); } Edited December 15, 2008 by shotputty Quote Link to comment Share on other sites More sharing options...
sLaV- Posted December 17, 2008 Share Posted December 17, 2008 Same problem here, seems to be something wrong, so i checked this with var_dump(get_defined_vars()) ; Then you can see that people actually have something in their cart! So I managed to work around it and by using some objects i wrote a piece of code that does it for me: (VERY UGLY CODE THOUGH) just after: $cart = $_SESSION['cart']; $currency = $_SESSION['currency']; I did this: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = 15; $i < $n; $i++) { if ($cart->contents[$i]['qty'] > 0) { if ($i == 7) { $productnaam = 'name1' ; } if ($i == 8) { $productnaam = 'name2' ; } if ($i == 9) { $productnaam = 'name3' ; } if ($i == 10) { $productnaam = 'name4' ; } $contents[] = array('text' => $cart->contents[$i]['qty'] . ' x ' . $productnaam ); } cheers for that ... u were missing 2 }'s ... tried that and still got nothing :( Quote Link to comment Share on other sites More sharing options...
noahvale Posted December 17, 2008 Share Posted December 17, 2008 A big thanks to Glen for all the hard work on this. Mine works perfectly. One thing that was bugging me was having to click on the boxes to choose refresh rate and to show the customers. I added the refresh rate and customer toggle to /admin/includes/filenames.php: define('FILENAME_WHOS_ONLINE', 'whos_online.php?refresh=120&show=cust'); Change as needed.. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 22, 2008 Share Posted December 22, 2008 hi guys nice stuff! i installed it although got a problem admin/whos_online.php created a border on the header and on the sides which i want to remove but can't seem to find where its define? any help? using the 3.5.4 v Quote Link to comment Share on other sites More sharing options...
Guest Posted December 22, 2008 Share Posted December 22, 2008 (edited) sorry! found it just added this in the header </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> anywaiz! great contribute! thanks heaps! Edited December 22, 2008 by xp02ed Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted December 22, 2008 Share Posted December 22, 2008 sorry! found it just added this in the header </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> anywaiz! great contribute! thanks heaps! The margin attributes are invalid in body tags in HTML 4.01. What they do to a page is open to interpretation by the browser. Please let me know what browser you are using and I will attempt to replicate the appearance in a standards-compliant way. Thanks, Glen Quote Link to comment Share on other sites More sharing options...
Guest Posted December 22, 2008 Share Posted December 22, 2008 The margin attributes are invalid in body tags in HTML 4.01. What they do to a page is open to interpretation by the browser. Please let me know what browser you are using and I will attempt to replicate the appearance in a standards-compliant way. Thanks, Glen Hi Glen i use Firefox 3, although it doesnt really matter nemore! i just copied the header html tags from configuration.php ! thanks anywaiz! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2009 Share Posted January 3, 2009 Hi, I've been using this extremely useful contrib for some time now, and as a result, i've noticed some interesting connections to my site. Basically, the 'customer' behaves like a 'bot, working it's way through the pages of the site 24 x 7, it doesn't have a session ID, or appear to go anywhere it shouldn't -BUT! It's IP keeps changing! It cycles through various sets of IP's ranging from Yahoo bot to private/ISP/Google addresses. Obviously there's some sort of spoofing going on here, the question is, how to stop it! - I tried banning the individual IP's, but it just adopted new ones, it only makes a database query every 30-40 seconds, so it's not tripping any DOS alarms on the server/firewall. Has anyone else seen anything similar, or have any ideas about what this could be (and how to stop it)??? Quote Link to comment Share on other sites More sharing options...
vicster Posted January 6, 2009 Share Posted January 6, 2009 I just wanted to say thank you for this awesome contribution! I only have an issue with not seeing someone's cart until I click on someone else and then come back to the person with the cart. I can live with that. (I'm not sure if my server has the suhosin patch and I'm globals=on). And thank you for still supporting this! Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted January 6, 2009 Share Posted January 6, 2009 I just wanted to say thank you for this awesome contribution! I only have an issue with not seeing someone's cart until I click on someone else and then come back to the person with the cart. I can live with that. (I'm not sure if my server has the suhosin patch and I'm globals=on). And thank you for still supporting this! Vickie, If suhosin is installed, you shouldn't see carts at all, so I think I can safely say that it isn't. Cart contents not showing up until you click on another user and come back is usually symptomatic of a register_globals bug, but I thought I had fixed all of that in v3.5.4. --Glen Quote Link to comment Share on other sites More sharing options...
Guest Posted January 11, 2009 Share Posted January 11, 2009 This is a screenshot of my whosonline.php page from my admin, anybody got any idea what makes it show the same thing twice? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2009 Share Posted January 14, 2009 This is a screenshot of my whosonline.php page from my admin, anybody got any idea what makes it show the same thing twice? Has anyone figured this out yet? I get the same bot listed 3 times with the same product or page. Online Name IP Address Entry Last Click Last URL Session? Referer? 04:48:20 Guest 02:47:45 am 07:36:05 am CPUs / AMD / / Motherboards / (Category) Yes Not Found Name: Guest ID: 0 IP Address: 208.36.144.6 User Agent: osCsid: 04:48:20 Guest 02:47:45 am 07:36:05 am CPUs / AMD / / Motherboards / (Category) Yes Not Found Name: Guest ID: 0 IP Address: 208.36.144.6 User Agent: osCsid: 04:48:23 Guest 02:47:42 am 07:36:05 am CPUs / AMD / / Motherboards / (Category) Yes Not Found Name: Guest ID: 0 IP Address: 208.36.144.6 User Agent: osCsid: Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2009 Share Posted January 14, 2009 Perhaps your spiders.txt is in need of updating. A newer one can be obtained from the contributions area. Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted January 14, 2009 Share Posted January 14, 2009 This is a screenshot of my whosonline.php page from my admin, anybody got any idea what makes it show the same thing twice? Has anyone figured this out yet? I get the same bot listed 3 times with the same product or page. Rickey, Are you using the data collector from this contribution? That would be the file catalog/includes/whos_online.php. Did you make any changes to it? Check Admin->Configuration->Sessions and let me know the settings for Force Cookie Use and Prevent Spider Sessions. (The usual settings are 'false' and 'true', respectively.) This contribution does not use the string 'YAHOO_BOT'; you may have another contribution that conflicts with this one. I think that the problem may be either in the data collector, as the one from this contribution sets the Name field to the User Agent string when a bot is detected. Yours does not. While it's not your current problem, you should run the latest spiders.txt to detect the greatest number of bots. --Glen Quote Link to comment Share on other sites More sharing options...
zeberrun Posted January 29, 2009 Share Posted January 29, 2009 will u solve suhosin security problem, we can not see shopping cards, will u find a way? Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted January 30, 2009 Share Posted January 30, 2009 will u solve suhosin security problem, we can not see shopping cards, will u find a way? I plan to revise the method that Who's Online uses to store and retrieve cart data from the database in a form that is compatible with the suhosin patch. However, like most contributors, I have a shop of my own to run and can only update this contribution when I have spare time to do so. My hosting provider has not installed suhosin, so it is not my highest priority at the moment. --Glen Quote Link to comment Share on other sites More sharing options...
zeberrun Posted January 31, 2009 Share Posted January 31, 2009 thanks Glen, i understand, u will make us very happy if u do so, we will be very happy to hear u soon. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2009 Share Posted February 5, 2009 Rickey,Are you using the data collector from this contribution? That would be the file catalog/includes/whos_online.php. Did you make any changes to it? Check Admin->Configuration->Sessions and let me know the settings for Force Cookie Use and Prevent Spider Sessions. (The usual settings are 'false' and 'true', respectively.) This contribution does not use the string 'YAHOO_BOT'; you may have another contribution that conflicts with this one. I think that the problem may be either in the data collector, as the one from this contribution sets the Name field to the User Agent string when a bot is detected. Yours does not. While it's not your current problem, you should run the latest spiders.txt to detect the greatest number of bots. --Glen Thanks Glen, I think my problem was with another whos online enhancement that was designed to show bots. I just replaced all the whos online files with what I guess is the latest version. I have another problem now. My page refreshes as it should but it dosent show products in the cart. Also the HTTP Referer dosen't change from one IP address to another. I might have a bot and 2 or 3 real customers all looking at different products from different IP addresses but the referer is the same. Is this the way it should work? Thanks, Rickey Quote Link to comment Share on other sites More sharing options...
Guest Posted February 7, 2009 Share Posted February 7, 2009 Hello peeps. I have this conrib installed and it works great, just a few problems, it does not pick up yahoo, live, and msn bots... Here are the details of one of the msn bots that comes round often, it also has a session which I thought bots didnt... 00:00:00 Guest msnbot-65-55-208-170.search.msn.com 11:30:49 pm 11:30:49 pm Aromas and Poppers (Category) Yes Not Found Name: Guest ID: 0 IP Address: 65.55.208.170 User Agent: msnbot/1.1 (+http://search.msn.com/msnbot.htm) osCsid: a271gfmfi7sn5i914je2tcgqu1 another one. 00:01:47 Guest msnbot-65-55-208-169.search.msn.com 11:27:43 pm 11:29:30 pm /catalog/login.php Yes Not Found Name: Guest ID: 0 IP Address: 65.55.208.169 User Agent: msnbot/1.1 (+http://search.msn.com/msnbot.htm) osCsid: hamfp9qusq5uj7a200sv5coii4 Also often once the bot has cehcked a page it then sends another bot to look at the page it just checked, (via its search engine) I dont know how to even think about modding the spiders.txt file so would appreciate it if someone could update it. Thanks a million :blush: Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted February 8, 2009 Share Posted February 8, 2009 Hello peeps. I have this conrib installed and it works great, just a few problems, it does not pick up yahoo, live, and msn bots... Here are the details of one of the msn bots that comes round often, it also has a session which I thought bots didnt... 00:00:00 Guest msnbot-65-55-208-170.search.msn.com 11:30:49 pm 11:30:49 pm Aromas and Poppers (Category) Yes Not Found Name: Guest ID: 0 IP Address: 65.55.208.170 User Agent: msnbot/1.1 (+http://search.msn.com/msnbot.htm) osCsid: a271gfmfi7sn5i914je2tcgqu1 another one. 00:01:47 Guest msnbot-65-55-208-169.search.msn.com 11:27:43 pm 11:29:30 pm /catalog/login.php Yes Not Found Name: Guest ID: 0 IP Address: 65.55.208.169 User Agent: msnbot/1.1 (+http://search.msn.com/msnbot.htm) osCsid: hamfp9qusq5uj7a200sv5coii4 Also often once the bot has cehcked a page it then sends another bot to look at the page it just checked, (via its search engine) I dont know how to even think about modding the spiders.txt file so would appreciate it if someone could update it. Thanks a million :blush: Have you checked the troubleshooting steps in the readme file? Spiders identified by spiders.txt won't get sessions if you set Prevent Spider Sessions to True in Admin->Configuration->Sessions. Note that some problems exist if you set Force Cookie Use to True. The MSNbot cloaking check is annoying, but there doesn't seem to be a good way to deal with it. It uses a valid user agent, so it passes the bot checking code. Steve Lionel maintains an up-to-date spiders.txt file in this contribution. Just replace your spiders.txt with either the small or large file from that contribution. The small one catches most bots, and impacts the server less. The large one detects some very obscure bots. --Glen Quote Link to comment Share on other sites More sharing options...
rocdy Posted February 11, 2009 Share Posted February 11, 2009 Can anyone help me with this error??? pleasee this is urgent. i never change my who_online.php and wht i was got this warning. Fatal error: Maximum execution time of 30 seconds exceeded in /home/bnetbtan/public_html/admin/whos_online.php on line 130 I start crazy to solve this problem. Thank You. Quote Rocdy Beginner in php programming and still learning from this forums. Special thanks for Oscommerce Community Forums that help me a lot. :-) Link to comment Share on other sites More sharing options...
SteveDallas Posted February 11, 2009 Share Posted February 11, 2009 Can anyone help me with this error??? pleasee this is urgent.i never change my who_online.php and wht i was got this warning. Fatal error: Maximum execution time of 30 seconds exceeded in /home/bnetbtan/public_html/admin/whos_online.php on line 130 I start crazy to solve this problem. Thank You. Were there many customers in the shop when this happened? The older versions of Who's Online spent a lot of time doing DNS resolution each time the page refreshed. Version 3.5 was designed to reduce the server load by caching the DNS names, which usually resolves the timeout issue. Install the current release, v3.5.4, and the problem should go away. --Glen Quote Link to comment Share on other sites More sharing options...
binkycrafts Posted February 14, 2009 Share Posted February 14, 2009 Hi, Fantastic contrib, we always keep an eye on our store and because of this enhancement we have managed to stave off a couple of problems with the ease of spotting customers with active carts and also not having all the bots show up is a real boon. One question is about stopping some of the bots that do show up from being displayed for example googlebot, is there anyway I can add googlebot to to the code so it is not displayed unless I choose to show bots? Sorry if this has been covered before. Thanks, Tony. Quote Tony Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2009 Share Posted February 14, 2009 Hi, Fantastic contrib, we always keep an eye on our store and because of this enhancement we have managed to stave off a couple of problems with the ease of spotting customers with active carts and also not having all the bots show up is a real boon. One question is about stopping some of the bots that do show up from being displayed for example googlebot, is there anyway I can add googlebot to to the code so it is not displayed unless I choose to show bots? Sorry if this has been covered before. Thanks, Tony. I like seeing the bots, there are some that I ban as a result of what they do. Quote Link to comment Share on other sites More sharing options...
binkycrafts Posted February 14, 2009 Share Posted February 14, 2009 any chance of a quick tip on how to ban . . although I don't want to stop them visiting my site , just don't want to display them in the list so i can focus on visitors who want to give me money . .any advise? Cheers, Tony. Quote Tony 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.