No, that sounds about right. So your table should have the following fields:
customer_session_id, item_id, quantity, final_price so then all you have to do is query this table looking for all items in customers shopping cart. I am not quite sure how you are going about calculating orders in customer's basket. You said you wrote a function with multiple IF statements, can you show me the code for this function so that I can get a better idea of what you are currently doing? -----Original Message----- From: Cesar Aracena [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 8:38 PM To: 'Ralph Guzman'; [EMAIL PROTECTED] Subject: RE: [PHP] Delimiter WITHOUT lots of IF's Importance: High Sensitivity: Confidential Using a cookie (I know, I know...) I plant a cookie in the visitor's browser when he opens the site with a random generated number which expires when the browser(s) is closed. With that SID, PHP stores the orders (one per line) into a "sessions" table in MySQL each with the itemID. Is it fine or am I too messy? TXS, Cesar Aracena > > How are you keeping track of items added being added to the shopping > cart? > > -----Original Message----- > From: Cesar Aracena [mailto:[EMAIL PROTECTED] > Sent: Monday, August 18, 2003 7:55 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Delimiter WITHOUT lots of IF's > Importance: High > Sensitivity: Confidential > > Hi all, > > I need to create an automatic process for visitors who are adding items > into a shopping cart, be able to see how many MBs and how many CDs will > the order have. > > >From this site, visitors will be able to choose one ore more software > products from a list of hundreds. I want them to check the cart to see > something like: > > Total size: 872,43 MBs > Total CDs: 2 > Total price: $XXX,XX > > Now, I developed a decision function that works with a lot of IF > statements, but I only calculated a max o 6 CDs (690,00 MBs max. per > CD), but I want to be able to make this automatically... Can someone > help me with this? > > BTW, Using PHP 4+ and MySQL 3+. > > Thanks in advanced, > > Cesar Aracena > www.icaam.com.ar > > Note: The information inside this message and also in the attached files > might be confidential. If you are not the desired receptor or the person > responsible of delivering the message, we notify you that it's copy, > distribution, keep or illegal use of the information it has it's > prohibited. Therefore we ask you to notify the sender by replying this > message immediately and then delete it from your computer. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php