Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who's Online Enhancement 1.4


Guest

Recommended Posts

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 by shotputty
Link to comment
Share on other sites

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 :(

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by xp02ed
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 weeks later...

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)???

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:  

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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

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

Link to comment
Share on other sites

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.

Tony

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...