Losing shopping cart when going to secure server.

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

Hi, I found out that when I go to the secure server the "get_host" command brings back nothing so the cgi script thinks I don't have a shopping cart and makes a new one with the line "store1-" instead of "store1-" so it is not reading the right cart. The question is there a way to check the "get_host" command for no host such as "if $host="0" then get old number" Then to get the host number from the non-secure mode to carry over to secure mode. I think if we can figure this out it will save a lot of the lost shopping cart problems.


-- James L. Farmer (jim@team-blankets.com), June 01, 1999



I think one of your problems may stem from your secure server. If your script is not producing a host address from get_host, then the server is not gathering host information. Many ISPs turn off host lookups to speed up the server. You will probably need to change all references of $ENV{'REMOTE_HOST'} to $ENV{'REMOTE_ADDR'}. The latter will use an ip address instead of the host. Hope this helps.


-- Frank Garrison (frank_garrison@yahoo.com), June 02, 1999.

Thanks Frank,

I was going to change to "get-addr" but after reading all the postings on lost shopping carts that did not fix all the problems. Still working on a fix but need to do more testing.


-- James L. Farmer (jim@team-blankets.com), June 02, 1999.

Moderation questions? read the FAQ