• 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

how to create shopping cart

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am designing a website for online shopping. i need the option of " add to shopping cart" . A user can add any item to his shopping cart. how can i do so?? if i do this by creating table in database the how can i create dynamic tables in database?? please suggest me any other option too.. thanhx.
 
Saloon Keeper
Posts: 7585
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does adding an item to a shopping cart have to do with creating table? The table should have been created before the web app containing the shopping cart was ever first run, no? Or are you proposing to create a new table for each user? That would be such an unusual design that I would strongly urge you to reconsider.
 
Greenhorn
Posts: 11
Objective C Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, A shopping cart is implemented using Sessions, but I agree with Tim that you have to rethink a little because there are some weird concepts mixed...
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used cookies (as the session was so short) but I am sure I will be shot down for this

Edit: no it wasn't a good example.
 
Ernesto Arroyo
Greenhorn
Posts: 11
Objective C Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cookie for the shopping cart?

The items should be saved in the server, not in a cookie. Sounds rather weird!
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ernesto Arroyo wrote:cookie for the shopping cart?

The items should be saved in the server, not in a cookie. Sounds rather weird!



I needed to keep the cart for users who hadn't logged in yet, so couldn't think how to id them.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Advanced shopping carts will generally use a number of solutions, including cookies, the session, and a database to account for the numerous situations (logged in vs. not logged in, and so on).
 
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out netbeans java e-commerce tutorial. There is a great implementation of one there: netbeans tutorial
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting HTML5 Implementation:

http://www.webdesignermag.co.uk/blog/create-a-shopping-cart-with-html5/
 
reply
    Bookmark Topic Watch Topic
  • New Topic