NYCPHP Meetup

NYPHP.org

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

Sajith A sajith.ml at gmail.com
Tue Dec 14 11:56:35 EST 2004


Randal Rust wrote
> In looking at the cart, there is an issue that I am not quite sure how
> to resolve. Any customer (registered or not), should be able to add
> items to their shopping cart, leave the site, and come back later and
> still see the items in their cart.

As Chris Snyder pointed out, it will be good to store the cart in db.
I would also suggest to clean cart table over a period of time - may
be by a cron job - that will delete dead entries generated by casual
browsing [checking against timestamp].

Another thing that is told about carts in general[i think i heard it
from a case study based on amazon] is that, people tend to skip the
cart if they are prompted for a username and password right at the
beginning. It would be ideal to ask for a username and password while
checking out rather than while adding to cart.. You can still save the
temporary cart based on a random unique id generated by the system for
the user stored in the browser.

Ip addresses will not be a good choice as dial-up users will be
getting a random ip from the ISP pool.

God bless you
Sajith A



More information about the talk mailing list