Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Orders coming through under wrong customer account


simonkistemaker

Recommended Posts

Posted

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!

Posted

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.

Posted

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.

Posted

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?

Posted

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();
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...