ecommerce design
Moderator: General Moderators
ecommerce design
I'm using session methods to creat shoping cart and process it. Is it the write method to do so.I would be grateful if somebody can answer me.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
The real question is how long you want to persist the cart for. If you are ok having the data persistent for only the current session then using the session is probably preferable because PHP does the housekeeping tasks like removing abandoned carts. If you want longer persistence then you will need to go to user accounts and storing the cart in a database. I usually use sessions for simplicity. It is probably best to make your cart datasource independent.
(#10850)