Page 1 of 1
ecommerce design
Posted: Tue Oct 17, 2006 2:01 pm
by puraskar
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.
Posted: Tue Oct 17, 2006 2:10 pm
by Luke
Storing information in sessions is the most common way to maintain state in php if that is what you are asking.
Posted: Tue Oct 17, 2006 2:20 pm
by Christopher
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.