Forum Moderators: coopster

Message Too Old, No Replies

Very simple shopping cart

cookie question

         

RussellC

3:15 pm on Aug 6, 2008 (gmt 0)

10+ Year Member



I am making a very simple shopping cart that is not meant to have a payment gateway. I just need to make it easy for the person to add products and categories which is no problem. The problem is I have only made PHP apps with a login and I don't know how to manage an add to cart type thing without user identifying information. How do I ID a user and let them add stuff to a cart and the check out. Do I store it in a DB but them how does the info get deleted eventually? Thanks for the help.

eelixduppy

5:06 am on Aug 7, 2008 (gmt 0)



Usually classes are used for this sort of eCommerce shopping cart sort of thing, so I'd write a shopping cart class to make this easier. As far as keeping track of the items added, you have to serialize [php.net] the shopping cart object and add it to a session variable. For more information on sessions, read the documentation: [php.net...]

RussellC

3:53 pm on Aug 7, 2008 (gmt 0)

10+ Year Member



Thanks, I got the session vars working now!