AOL and using IP address

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

This issue has been talked about earlier on this message board, but I'd like to ask as few questions about it. First of all, I've had problems using the s-mart script with AOL users. I was wondering if anyone else has had problems with AOL users as well? I receive an empty shopping cart whenever a customer through AOL tries to place an order. Someone suggested changing GET_HOST to GET_ADDRESS. This has fixed the problem of the carts being lost on a secure server, but I'm still having troubles with AOL. I was wondering if anyone else has used the idea of generating unique id's for carts instead of using the IP address? If anyone has, I'd like to ask for help on setting this up.

thanks a lot, JS

-- Jeremy Smith (pancakepan@usa.net), November 10, 1998

Answers

Find the following section in the SMART.CGI file:

# Get the hostname, for file reference sub get_host { $host = $ENV{'REMOTE_HOST'}; $reffile = "$tmpdir$delim$storename-$host"; }

Replace with the following lines:

# Get the hostname, for file reference sub get_host { $host = $ENV{'REMOTE_HOST'}; $p_id = ($$ % 10000); $reffile = "$tmpdir$delim$storename-$host-$p_id"; }

-- God bless!

-- Patrick Chan (patrickccf@hotmail.com), February 14, 2000.


I have implemented cookies with my cart. If you are interested to know more, email me at patrickccf@hotmail.com.

--
God bless!

-- Patrick Chan (patrickccf@hotmail.com), March 20, 2000.


Moderation questions? read the FAQ