Re: [PHP-DB] Building a Shopping Cart
Simply, sessions. Look on php.net for some tutorials about sessions, that's what you're gonna need. You could do it simply by setting cookies in the users browser, but sessions work better. As I understand it, sessions also set a cookie in your browser, but only one which identifies the owner of the session. If the user had cookies disabled, then php would default to appending the session information to the url's (basically avoiding the problem). You'll probably find a lot of info on www.php.net about this though. - Original Message - From: "Matt Braynard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 10, 2001 12:17 PM Subject: [PHP-DB] Building a Shopping Cart > I'm trying to build a shopping cart and am unsure of how to track what each > visitor has purchased as they shop. How do I track what items they add as > they move through the online catalog adding things and then checkout. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Building a Shopping Cart
It all depends how you have your set up. Are all customers permanent or are they temporary? assign the customer a session id, or cookie depending on how you want to store this, and then insert the user in to the users table when they add an item to the basket, and add the item to a basket table. You may want if they are not permanent to write the order to a session array, and when they check out then write the contents to the order tables. you will need prodid, styleid, qty. Rick At 03:17 PM 4/10/01 -0400, Matt Braynard wrote: >I'm trying to build a shopping cart and am unsure of how to track what each >visitor has purchased as they shop. How do I track what items they add as >they move through the online catalog adding things and then checkout. > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] ## # Rick St Jean, # [EMAIL PROTECTED] # President of Design Shark, # http://www.designshark.com/, http://www.phpmailer.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ## -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Building a Shopping Cart
At 03:17 PM 4/10/2001 -0400, Matt Braynard wrote: >I'm trying to build a shopping cart and am unsure of how to track what each >visitor has purchased as they shop. How do I track what items they add as >they move through the online catalog adding things and then checkout. Make a table that represents items purchased. In this table include at least, the product ID, customer ID and a status column which represents "in basket", "purchased", "shipped", "frozen", etc. Once an order has been completed just update the status to "purchased". Cheers - Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail:[EMAIL PROTECTED] Canada WWW: http://www.islandnet.com/ - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Building a Shopping Cart
I'm trying to build a shopping cart and am unsure of how to track what each visitor has purchased as they shop. How do I track what items they add as they move through the online catalog adding things and then checkout. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]