ballouta Posted February 3, 2009 Share Posted February 3, 2009 Hello I am looking for answers on a good shopping cart concepts NOT looking for code I want to make a shopping cart based on Session, if this is a good choice of course. The visitor is not requested to register unless he/she wants to submit his/her order. Q1: Do I open a new session avariable that holds a random order number while this vistor is making shopping? Q2: While the visitor is adding some items to the cart, the items are stored in a temp table in my DB, is this correct? Q3: if the visitor decided to close the windows explorer window and not to contine the shopping, what happens to items been added? and if the items were added to a temp table what happens with it? Q3-b: How those items can be removed automatically? Q4: what is the PHP tecnique used to save the cart for this user if he opens later the website and wants to see items added to his cart? dies this need cookies or what? Many Many thanks Quote Link to comment Share on other sites More sharing options...
aebstract Posted February 3, 2009 Share Posted February 3, 2009 Q2: They aren't stored in your database, which is why you are doing a session. They are stored in that session as an array. Q3: If they close the window (and I may be wrong on this, but I'm fairly sure) the session will time out after a set period of time, set by the server or by you when creating the session. Q3-B: I believe you can set the session to time out at whatever amount of time you wish. Q4: So that they don't lose their information by a session timeout, you would need cookies. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.