I use beaker sessions for something similar. Basically, i have sqlite
based session (so its there if my server restarts), and I serialize the
entire shopping cart object into the session.
Once a user logs in, the session object is converted to a 'real'
shopping cart which, in my case, is bound to the user_id.
Of course, the annoying part of this is that this session -> cart
conversion has to happen, but its not really that bad (i have a pretty
simple use case).
DD.
Jonathan Vanasco wrote:
On Jan 25, 4:36 am, Wichert Akkerman<[email protected]> wrote:
Beaker sessions.
either beaker sessions, or just use a beaker session id as the
shopping cart / user id
you could do a dbtable that has this:
table: cart
id bigserial primary key not null,
session_id char(32) unique ,
useraccount_id bigint references useraccount(id),
allow null in session_id and useraccount_id , so that session carts
can be merged into useraccount carts after registration, and vice-
versa.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.