On Tue, Nov 16, 2010 at 9:23 AM, Stephen <step...@ninjacodermonkey.co.uk> wrote:
> Hi There
>
> I need to give my customers the ability to save incomplete orders and
> restore them at a later date.
>
> The orders are quite intricate and can sometimes contain a lot of data (this
> is another reason why I need save and load).
>
> The data is contained within
>
> $this->Session->read('Order');
>
> Any hints on how I can achieve this?
>
> I don't want to save other session data including auth session data.

You could create a SavedOrder model, complete with associations to all
other data models involved. I've done something similar. Or, I guess
you could save the Order, but leave some flag column set to 0
(incomplete), for example.

Are the users logged in? Having a user_id would make it a bit simpler
but it's not strictly necessary. You could simply save a long-term
cookie with the SavedOrder.id (I'd suggest to use UUID for that). If
the cookie expires before they return, too bad.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to