Jump to content

[SOLVED] Shopping Cart Concepts


ballouta

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.