jonmadrid
VP-CART New User
USA
192 Posts |
Posted - May 13 2004 : 15:35:18
|
Hi Kevin,
The session state is cleared when the browser is closed so even if you come 'right' back after closing the window, there won't be anything in your session variables to draw on.
Thats where the concept of cookies comes in: they are able to create a qausi-stateless environment where info can be stored, left alone for a while, then retrieved at a later time. The session object does all of that as well, but it only does it for the length of time you specify (default is 20 minutes) and so long as you don't close the browser (or go to another site). Cookies persist until the date or time you specify that they expire.
You could modify the cart to write the product information to a cookie at the same time it writes it to the session variables. That way, if the session object produced a blank value (if browser was closed or user navigated away from site), you could fall back on the values that were put in the cookies. I'm not sure what it would take to do that, or how feasible it would be but thats the first solution that comes to mind.
Hope that helps.
All the best,
Jon Madrid -------------------- Madrid Communications Web Design, Development, and Hosting www.madridcom.com
|
|
|