Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who's Online Enhancement 1.4


Guest

Recommended Posts

Think I've cracked it!

 

in admin>whos_online.php

 

change mozilla to Mozilla approx line 416

 

Did it for me.

Link to comment
Share on other sites

Better still probably better to use strtolower() in case the bots decide to change their name.

 

if ( !strstr(strtolower($tok), "mozilla") &&
						 !strstr(strtolower($tok), "compatible") &&
						 !strstr(strtolower($tok), "msie") &&
						 !strstr(strtolower($tok), "windows")
					   ) {

Link to comment
Share on other sites

Better still probably better to use strtolower() in case the bots decide to change their name.

 

if ( !strstr(strtolower($tok), "mozilla") &&
						 !strstr(strtolower($tok), "compatible") &&
						 !strstr(strtolower($tok), "msie") &&
						 !strstr(strtolower($tok), "windows")
					   ) {

 

 

Thank you!! That change worked perfectly! I'm not sure what it all means, but now Googlebot is displayed properly. Could you tell me what the strtolower bit you added does. Thank you!

James Tomasello

Link to comment
Share on other sites

strtolower($tok) converts all text in $tok to lower case that's all

Link to comment
Share on other sites

strtolower($tok) converts all text in $tok to lower case that's all

 

 

Oh!

 

Call me stupid, but I fail to see the importance of all lowercase, however the code does work now! I am having trouble understanding why this change made it work.

James Tomasello

Link to comment
Share on other sites

Actually if you want a full solution not only for bots with mozilla in their string but also looksmart, FAST and some others change your code with the following:

				   // Tokenize UserAgent and try to find Bots name
				$tok = strtok($whos_online['user_agent']," ();/");
				while ($tok) {
				  if ( strlen($tok) > 3 )
					if ( !strstr(strtolower($tok), "mozilla") &&
						 !strstr(strtolower($tok), "compatible") &&
						 !strstr(strtolower($tok), "msie") &&
						 !strstr(strtolower($tok), "windows") &&
						 !strstr(strtolower($tok), "dead") &&
						 !strstr(strtolower($tok), "link") &&
						 !strstr(strtolower($tok), "checker") &&
						 !strstr(strtolower($tok), "wn.dlc") &&
						 !strstr(strtolower($tok), "zyborg")

					   ) {
					  echo "$tok";
					  break;
					}
				  $tok = strtok(" ();/;@");
				}

 

On another note, the cart display does not seems to work anymore if you use file based sessions ..looks like a permission access problem but I cannot get it to work.

Anyone got the same issue ?

Link to comment
Share on other sites

Actually if you want a full solution not only for bots with mozilla in their string but also looksmart, FAST and some others change your code with the following:

				   // Tokenize UserAgent and try to find Bots name
				$tok = strtok($whos_online['user_agent']," ();/");
				while ($tok) {
				  if ( strlen($tok) > 3 )
					if ( !strstr(strtolower($tok), "mozilla") &&
						 !strstr(strtolower($tok), "compatible") &&
						 !strstr(strtolower($tok), "msie") &&
						 !strstr(strtolower($tok), "windows") &&
						 !strstr(strtolower($tok), "dead") &&
						 !strstr(strtolower($tok), "link") &&
						 !strstr(strtolower($tok), "checker") &&
						 !strstr(strtolower($tok), "wn.dlc") &&
						 !strstr(strtolower($tok), "zyborg")

					   ) {
					  echo "$tok";
					  break;
					}
				  $tok = strtok(" ();/;@");
				}

 

On another note, the cart display does not seems to work anymore if you use file based sessions ..looks like a permission access problem but I cannot get it to work.

Anyone got the same issue ?

 

 

I thought I was having the same problem! But if you click the profile option(like: all or customer) it should display what is in the cart. Check it out and let me know if it's true for you too.

James Tomasello

Link to comment
Share on other sites

I thought I was having the same problem! But if you click the profile option(like: all or customer) it should display what is in the cart. Check it out and let me know if it's true for you too.

 

 

Ok! I was wrong! I only worked that way once. It does not seen to recognize the shopping cart. One other thing... When it did show the cart, everyone on my site had the same thing in their cart. With 3,000 products that is almost impossible.

James Tomasello

Link to comment
Share on other sites

Ok! I was wrong! I only worked that way once. It does not seen to recognize the shopping cart. One other thing... When it did show the cart, everyone on my site had the same thing in their cart. With 3,000 products that is almost impossible.

 

Hmm.. I also have this problem.

When a customer has something in his cart and you click on the next one, the have the same product in there cart, and the green dot turn red.

 

Anyone a sollution ?

 

Thanks!

P@rick

Link to comment
Share on other sites

Folks,

 

The #1 problem people have with WOE is because of sessions, especially when sessions are stored in files as opposed to the database. Here are some troubleshooting things to try. Most of this has been discussed earlier in the thread.

 

1) Make sure that BOTH catalog/includes/configure.php AND admin/includes/configure.php have the STORE_SESSIONS definition set to the same thing, either '' for files or 'mysql' for the database.

 

2) Change the sessions to the database (in both configure.php files (see 1 above.)) If you don't have the session files configured correctly, this will bypass the problem. (Try this when no one is in the store. Some people have reported that it takes a few hours until they see problems disappear. My theory is that any current visitor (person or bot) causes bad data to stick around til they're completely out of the system.)

 

3) Set Session values in Admin->Configuration->Sessions:

Session Directory => /your/path/to/your/sessions (Not important if you have sessions in the database.)

Force Cookie Use => False

Check SSL Session ID => False

Check User Agent => False

Check IP Address => False

Prevent Spider Sessions => True

Recreate Session => False

 

4) If sessions are stored in files, DO NOT STORE THEM IN /tmp. (Which is the default osCommerce setting). On a shared server, EVERYONE can access the /tmp directory, especially other osCommerce shops. If your store is at:

/user/home/yourdomain/public_html/catalog

create a folder at

/user/home/yourdomain/sessions (best) or

/user/home/yourdomain/public_html/sessions

and set the shop to use this folder (see 3 above.)

 

hth,

ed

Edited by medvid
Link to comment
Share on other sites

Hello Ed,

 

Thanks for your reply. When I look at the settings you describes, the all are the same.

But I still have this problem. :blink:

 

thanks,

P@rick

Link to comment
Share on other sites

Hello Ed,

 

Thanks for your reply. When I look at the settings you describes, the all are the same.

But I still have this problem. :blink:

 

thanks,

P@rick

 

I have the same settings and the problem still exists. I was think about it earlier today and decided to try something. I thought "what if this is a register globals issue. So, I placed this piece of code into the catalog/admin/whos_online.php right at the top.

 

link_get_variable('contents');

 

So far I think it is working!

James Tomasello

Link to comment
Share on other sites

I have the same settings and the problem still exists. I was think about it earlier today and decided to try something. I thought "what if this is a register globals issue. So, I placed this piece of code into the catalog/admin/whos_online.php right at the top.

 

link_get_variable('contents');

 

So far I think it is working!

 

Forget that last post!! It doesn't work!!

James Tomasello

Link to comment
Share on other sites

anyone know if there is a .sql file for this contribution?

Im still very much a noob when it come to altering sql db's

other contributions I have used came with an .sql file to add automatically what was need to make it work.

Link to comment
Share on other sites

Hello,

 

i have many probs with update the contrib :(

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /XXX/catalog/admin/includes/functions/database.php on line 45

0 -

 

select time_entry, time_last_click from whos_online where session_id='d5d5d5c71ff7c905a53de635ff7aa7f3'

 

[TEP STOP]

 

.)

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

 

sameony any idea ?

Link to comment
Share on other sites

anyone know if there is a .sql file for this contribution?

Im still very much a noob when it come to altering sql db's

other contributions I have used came with an .sql file to add automatically what was need to make it work.

Paul,

 

If you check the instructions, steps 2A and 2B give the necessary SQL code. Either cut and paste the lines (read instructions for which to use) into your DB interface of choice. OR, copy the lines into a text editor, save them as update2A.sql and update2B.sql and use as appropriate.

 

ed

Link to comment
Share on other sites

Thanks for your reply. When I look at the settings you describes, the all are the same.

But I still have this problem. :blink:

Patrick,

 

Where are the sessions stored and which version of WOE are you using?

 

ed

Edited by medvid
Link to comment
Share on other sites

Patrick,

 

Where are the sessions stored and which version of WOE are you using?

 

ed

 

Ed,

 

The sessions are stored in the database (not in files) and in the root.

 

The version i'm ussing is 1.7.1

 

P@rick

Link to comment
Share on other sites

Folks,

 

The #1 problem people have with WOE is because of sessions, especially when sessions are stored in files as opposed to the database. Here are some troubleshooting things to try. Most of this has been discussed earlier in the thread.

 

1) Make sure that BOTH catalog/includes/configure.php AND admin/includes/configure.php have the STORE_SESSIONS definition set to the same thing, either '' for files or 'mysql' for the database.

 

This did the trick for me thanks.

I will have to try the tip about emptying the store one night nad move onto mysql ont he shop. For some reason I alwas had troubles with those with lost cart, currency settings or languages. Worked fin in the admin side though

 

Thanks for the fix ;)

Link to comment
Share on other sites

Paul,

 

If you check the instructions, steps 2A and 2B give the necessary SQL code. Either cut and paste the lines (read instructions for which to use) into your DB interface of choice. OR, copy the lines into a text editor, save them as update2A.sql and update2B.sql and use as appropriate.

 

ed

 

 

Thanks for that!

I had a rough idea but I didnt wanna stuff it all up!

 

 

All working fine now

 

Thanks again!

Link to comment
Share on other sites

installed today exactly as instructions but got 1054 error fields/columns missing

 

1st time installation, any suggested

 

Converted bact to existing version until there is a fix!!!!!

Lenny,

 

Did you run the SQL code? Steps 2A and 2B?

 

ed

Link to comment
Share on other sites

Hello,

 

i have many probs with update the contrib :(

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /XXX/catalog/admin/includes/functions/database.php on line 45

0 -

 

select time_entry, time_last_click from whos_online where session_id='d5d5d5c71ff7c905a53de635ff7aa7f3'

 

[TEP STOP]

 

.)

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

 

sameony any idea ?

Michi,

 

You may need to repair the table. Log on to phpMyAdmin, click on the whos_online table, click on Structure, and click on Repair Table. I'm assuming that you ran the SQL code in steps 2A and 2B.

 

ed

Link to comment
Share on other sites

Ed,

 

The sessions are stored in the database (not in files) and in the root.

 

The version i'm ussing is 1.7.1

 

P@rick

P@rick,

 

At this point, I would suggest reinstalling, making sure that you didn't miss anything (like the whos_online.php file that goes under catalog/includes/functions) or move up to a later version. I have 1.9 installed and it works well. I have not stepped up to 2.0, merely due to lack of time.

 

ed

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