NYCPHP Meetup

NYPHP.org

[nycphp-talk] Saving Items for Later in a Shopping Cart

Josh McCormack joshmccormack at travelersdiary.com
Tue Dec 14 10:17:06 EST 2004



csnyder wrote:

> On Tue, 14 Dec 2004 09:09:39 -0500, Randal Rust
> <rrust at r2communications.com> wrote:
> 
>>Now I am thinking that I will have to use a cookie, but even then, how
>>do I ensure that the customer sees the correct items when they return?
> 
> 
> Since you're right about the session going away, you'll need to use a
> database to store the items, under an id that you can put into a
> cookie for when they come back. The items aren't stored in the cookie,
> only the reference to the cart.
> 
> A bonus to this approach is that you can also mark the cart with a
> userid, so that if they start shopping from home, but then log in at
> work to complete the transaction, they can pick up where they left
> off.
> 

I'd recommend not having the registration process be a one shot thing. 
Have them choose a user name and password, then later on billing and 
shipping. Otherwise it's too much work if they're just browsing/checking 
stuff out.

Josh




More information about the talk mailing list