simonkistemaker Posted December 6, 2006 Posted December 6, 2006 I have a problem when someone orders a product from the shop. The order sometimes contains the address information of the previous customer. Does anybody have the same problem and better yet, does anybody have a solution? Thanks!
micetrap Posted December 6, 2006 Posted December 6, 2006 I am having the same exact problem. It isn't happening a lot, but it happened 3 times yesterday. Hopefully someone can help us with this situation, I believe it has to do with Sessions.
jdvb Posted December 6, 2006 Posted December 6, 2006 see my post here I store sessions in mysql, but a solution for filebased sessions is posted there too edit: the later part of that post contains a solution, in the start I prevented your error from occuring by setting check user ip to true (If a session from a previous customer is opened this generaly has a different IP than the current visitor). becouse of this check my customers were redirected elsewhere, and not getting to see other customers adress information.
simonkistemaker Posted December 6, 2006 Author Posted December 6, 2006 Thanks for your reply. I added your fixes, but this part: if (isset($_GET[tep_session_name()])) { if (!file_exists(SESSION_WRITE_DIRECTORY.'/sess_'.$_GET[tep_session_name()])) { unset($_GET[tep_session_name()]); } $newpagetoredirectto = $_SERVER['REQUEST_URI']; $newpagetoredirectto = preg_replace("#(.*?)\??osCsid=(.*)#s", "\\1", $newpagetoredirectto); header("HTTP/1.1 301 Moved Permanently"); header("location: $newpagetoredirectto"); exit(); } ... makes the shop empty the cart when the customer wants to browse for another product. Or have I not implemented it correctly? I enabeld Recreate Sessions on the admin page, but that does not make a difference or does it? I suppose you have tried this as well?
jdvb Posted December 6, 2006 Posted December 6, 2006 true, it does empty the shopping cart... oeps... if (isset($_GET[tep_session_name()])) { if (!file_exists(SESSION_WRITE_DIRECTORY.'/sess_'.$_GET[tep_session_name()])) { unset($_GET[tep_session_name()]); $newpagetoredirectto = $_SERVER['REQUEST_URI']; $newpagetoredirectto = preg_replace("#(.*?)\??osCsid=(.*)#s", "\\1", $newpagetoredirectto); header("HTTP/1.1 301 Moved Permanently"); header("location: $newpagetoredirectto"); exit(); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.