• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Add items to a wishList / no register user

 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I would like to find the best possible solution for this case. There is an E-Commerce application, and I would like to be able to add products to the wishList, without the need to be registered.

I am thinking in using the session, because the articles that are choosen should remain in the cart, at least during the session spanlife.


Any idea, please?

Regards, Isaac

 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Presumably the wishlist only lasts for the session?
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the moment I think till there, although it would be much better when (without registering) it would last over the session.

Any idea, please?
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a different perspective, for example an user is registered and log in the system, then he adds few products in the wishList, and leaves. Later on, he comes back and check the page without logging add some articles to the cart(without logging) and then he decides to buy so he loggin. The old articles should be retrieved and the new ones added on top of them.

I am thinking in just to make a query to ask the data for the articles, and get the new ones from the Session.

Sounds that as good approach for you all?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The idea of adding items to a cart or a wish-list without logging in doesn't make much sense to me. If the user doesn't log in, how do you know who they are? You need to know that to add items to their cart or their wish-list.
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And for me the idea of a wish-list which goes away a few minutes after I close my browser doesn't make sense either. A wish-list contains items that I might want to buy at some time in the future, doesn't it?
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And also the idea that if I get called away from the computer for more than half an hour, then when I come back I've been signed out and my cart has been emptied -- that doesn't sound like a very good e-commerce design to me.
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally the idea is when for example, when an user is registered and logged and has some articles in the DB.  And then he visits again, without logging and adds some products to the wishlist (session) and then logging to buy them that new products in the session go on top of the ones that there in the DB already.
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I know that's the idea. My question about that idea is, if the user isn't logged in then you don't know who they are. So how are you supposed to add items to the user's wish-list if you don't have any user logged in?

Or perhaps I misunderstand the design. Perhaps there's only one wish-list and it's for all users, so anybody can connect to your server and add items to the one and only wish-list?
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The way it normally works is there's a session cart if the user isn't logged in.
That will go away if the session expires and the user hasn't logged in.

When the user logs in, part of the process involves merging the existing shopping cart and/or wishlist (they are two different things, by the way) with whatever has been persisted for that user in the database.

As I say, the shopping cart and a wish list are not the same thing.
The former is stuff the user is planning on buying on their next time through the checkout.  It's the same as the contents of your shopping trolley at the supermarket.
The wish list is something you quite fancy to buy at some point, but not yet, so you note it down somewhere.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic