Zen Cart Logo
Forums / General Questions / Recreate Session - how does cart know what the new session id is?

Recreate Session - how does cart know what the new session id is?

Views: 1,244

Results 1 to 4 of 4
13 Jan 2012, 6:13 PM
#1
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Recreate Session - how does cart know what the new session id is?

ZC 139h

If recreate_session is triggered, how does the cart know what the new session id is and how to associate it with the old session id?

In other words, what is the code "bridge" built to the new session id?

Are there any flags or variables that are triggered that could be used in an external module to keep the shopping session straight?

Thanks :smile:

13 Jan 2012, 10:34 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Recreate Session - how does cart know what the new session id is?

It simply memorizes all the existing session contents, deletes the old session id, creates a new session id, and restores all the prior session variable contents to it. Nothing special.

If you're using an "external" service or addon that is memorizing session ids then it's probably founded on very poor logic.

15 Jan 2012, 6:31 PM
#3
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Re: Recreate Session - how does cart know what the new session id is?

Thanks Dr.

No, it just needs to know what the new session id is so it can keep everything straight

15 Jan 2012, 6:34 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Recreate Session - how does cart know what the new session id is?

Which module are you talking about? What exactly does it need to "keep straight"? Tying anything external to internal specific session id numbers is generally bad practice.