[Pdx-pm] Shopping Cart Logic

A.J. Weinzettel aj at linuxaid.org
Thu Mar 6 22:14:40 CST 2003


I am building a custom shopping cart for a customer and I am trying to
find a better way to add / delete products from the cart.  Here is my
logic:

1. Customer adds an item to the cart

2. Check the presence of a cookie
   a. If no cookie set a unique cookie using time goto 3
   b. If cookie present goto 3

3. Insert a record into the database with the unique id and product info
   a. If customer checks out goto 4
   b. If customer keeps on shopping goto 1

4. Customer checks out and records from shopping_cart table get
transferred to products_ordered table.

My problem is when a customer does not check out the records in the
shopping_cart table get abandoned.  I really don't like this idea.  I
could write a cron to delete the records that are x days old, but I am
wanting something that does not require an outside process.  What other
ways can I keep the database nice and clean?

Thanks,
A.J. Weinzettel

http://ajscomputerbug.com

   





More information about the Pdx-pm-list mailing list