Re: Lazy Registration
Hi Jonathan, Thanks for the suggestion, I just can't work out how I'd match up the individual sessions to the same cart if the user is not signed in. Am I missing something here? Matthew On Jan 26, 6:35 pm, jgard...@jonathangardner.net jgard...@jonathangardner.net wrote: A better idea might be to map carts to sessions, and then sessions to customers. Each session has a cart. Each cart may belong to more than one session. A customer can identify with more than one session, although each session can only identify with up to one customer. This way, the customer can put stuff in their cart at home, go to work, add some more stuff, and then come home, and have everything in their cart. The customer has two active sessions because the browser at work and the browser at home don't share cookies. Plus, your logs will have a more realistic picture of what's really going on, since each session maps to exactly one browser. On Jan 25, 9:54 pm, Matt Woolnough m...@woolnough.com.au wrote: Thanks guys for your input. I found a couple of threads on stackoverflow on similar questions: http://stackoverflow.com/questions/1969711/best-way-to-place-temporar.. Although it seems there will be a performance penalty for this type of arrangement, I think I'll attempt to implement something like what Jonathan suggests. Hopefully the decision doesn't turn out to be a bad one... Oh well it's all just a learning experience eh? cheers again- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
When a user first visits the website, a cokie is set on that machine only - anything you add to the beaker session will stay in there, then when the user registers you can use the the data that was saved to the session before they registered. I can't think of any way for a user to go to different sites and access the same cart unless they've signed in or have some sort of token that they provide from both sites (for a contrived example though, if a user went to the site at home and added items to a cart, then copied their cookie from teh home machine to another machine they would see the same card data) -Original Message- From: Matt Woolnough m...@woolnough.com.au Sent: Wednesday, 27 January, 2010 11:14pm To: pylons-discuss pylons-discuss@googlegroups.com Subject: Re: Lazy Registration Hi Jonathan, Thanks for the suggestion, I just can't work out how I'd match up the individual sessions to the same cart if the user is not signed in. Am I missing something here? Matthew On Jan 26, 6:35 pm, jgard...@jonathangardner.net jgard...@jonathangardner.net wrote: A better idea might be to map carts to sessions, and then sessions to customers. Each session has a cart. Each cart may belong to more than one session. A customer can identify with more than one session, although each session can only identify with up to one customer. This way, the customer can put stuff in their cart at home, go to work, add some more stuff, and then come home, and have everything in their cart. The customer has two active sessions because the browser at work and the browser at home don't share cookies. Plus, your logs will have a more realistic picture of what's really going on, since each session maps to exactly one browser. On Jan 25, 9:54 pm, Matt Woolnough m...@woolnough.com.au wrote: Thanks guys for your input. I found a couple of threads on stackoverflow on similar questions: http://stackoverflow.com/questions/1969711/best-way-to-place-temporar.. Although it seems there will be a performance penalty for this type of arrangement, I think I'll attempt to implement something like what Jonathan suggests. Hopefully the decision doesn't turn out to be a bad one... Oh well it's all just a learning experience eh? cheers again- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
A better idea might be to map carts to sessions, and then sessions to customers. Each session has a cart. Each cart may belong to more than one session. A customer can identify with more than one session, although each session can only identify with up to one customer. This way, the customer can put stuff in their cart at home, go to work, add some more stuff, and then come home, and have everything in their cart. The customer has two active sessions because the browser at work and the browser at home don't share cookies. Plus, your logs will have a more realistic picture of what's really going on, since each session maps to exactly one browser. On Jan 25, 9:54 pm, Matt Woolnough m...@woolnough.com.au wrote: Thanks guys for your input. I found a couple of threads on stackoverflow on similar questions: http://stackoverflow.com/questions/1969711/best-way-to-place-temporar...http://stackoverflow.com/questions/964476/store-in-session-data-vs-st... Although it seems there will be a performance penalty for this type of arrangement, I think I'll attempt to implement something like what Jonathan suggests. Hopefully the decision doesn't turn out to be a bad one... Oh well it's all just a learning experience eh? cheers again -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
The answer doesn't need to be pylons specific. I just happen to be using this framework, so this group seemed like a good place to start. I'm looking to store info thats a bit more complex than just a item number, so I'm considering storing temporary items created in guest sessions in a table along with items saved in users sessions. The temporary items would need to be flagged in someway in the DB cleaned out somehow Any thoughts? Matthew On Jan 25, 5:27 pm, Jamie jjbe...@gmail.com wrote: That's a pretty broad application design question and with an answer that isn't likely to be Pylons-specific. The easiest way would be to just keep track of the cart items using a Beaker session. On Jan 24, 9:45 pm, Matt Woolnough m...@woolnough.com.au wrote: Just wanting to get some ideas on how best to implement 'lazy registration' using pylons. An example of this functionality is in Amazon where a user can add items to their shopping cart without being signed in. Any ideas appreciated. - thanks. Matthew -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
On 1/25/10 09:57 , Matt Woolnough wrote: The answer doesn't need to be pylons specific. I just happen to be using this framework, so this group seemed like a good place to start. I'm looking to store info thats a bit more complex than just a item number, so I'm considering storing temporary items created in guest sessions in a table along with items saved in users sessions. The temporary items would need to be flagged in someway in the DB cleaned out somehow Any thoughts? Beaker sessions. Wichert. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
On Jan 25, 4:36 am, Wichert Akkerman wich...@wiggy.net 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 pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
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 Akkermanwich...@wiggy.net 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 pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
Thanks guys for your input. I found a couple of threads on stackoverflow on similar questions: http://stackoverflow.com/questions/1969711/best-way-to-place-temporary-data-for-an-webapp http://stackoverflow.com/questions/964476/store-in-session-data-vs-store-in-sql-database-for-temporary-data Although it seems there will be a performance penalty for this type of arrangement, I think I'll attempt to implement something like what Jonathan suggests. Hopefully the decision doesn't turn out to be a bad one... Oh well it's all just a learning experience eh? cheers again On Jan 26, 2:59 am, DD d2n...@gmail.com wrote: 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 Akkermanwich...@wiggy.net 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 pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Lazy Registration
Just wanting to get some ideas on how best to implement 'lazy registration' using pylons. An example of this functionality is in Amazon where a user can add items to their shopping cart without being signed in. Any ideas appreciated. - thanks. Matthew -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Lazy Registration
That's a pretty broad application design question and with an answer that isn't likely to be Pylons-specific. The easiest way would be to just keep track of the cart items using a Beaker session. On Jan 24, 9:45 pm, Matt Woolnough m...@woolnough.com.au wrote: Just wanting to get some ideas on how best to implement 'lazy registration' using pylons. An example of this functionality is in Amazon where a user can add items to their shopping cart without being signed in. Any ideas appreciated. - thanks. Matthew -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.