Saturday, April 16, 2011

Saving state between visits (waking sessions back up)

Ok so I want to do something which I would imagine should be fairly straight forward with sessions, but can't for the life of me find documentation to support it.

Basically I want to be able to store the cake Session token in a cookie, then wake the session matching that cookie back up on a subsequent visit.

Imagine the following scenario (not precisely what I'm doing, but a good illustration none the less).

User visits an online store, and puts a bunch of items in their shopping cart.
User then decides to leave the store, without going through the checkout
Weeks later, the user revisits the store

I want to be able to grab the shopping basket that the user had already filled (stored in the session when the visited), and wake the session back up so they don't have to go and fill their basket back up with stuff again.

I get that I have to somehow store the session token in a cookie, but how do i wake expired sessions back up so that the state matches what it was when they left the store in the first place?

Help!?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate