Setting up a (fairly) simple shopping basket page
Posted 29 September 2006 - 12:44 PM
I know how to pass Product IDs from one page to another but I don't know how to pop the little buggers into an array which would list the items purchased and calculate quantities and total prices.
Can anyone give me some guidance on this please?
Posted 29 September 2006 - 01:12 PM
I'm guessing you're using layers as I navigated to this page....
I can't see any of the product descriptions as they're obscured by the size/colour/fastening box
Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools
Posted 29 September 2006 - 01:22 PM
Oh and how to do this. Have a temporary table in mysql that has user id and item in it and session. As the user adds items they are put in here and can be pulled. When an order is placed it will be moved from the temp table to the order table deleting the temp table(not the table just the data for that user and session). It is a good idea to have the date field in the temp table so that you can auto delete any data left in there when people add stuff and don't check out.
Each item could just be a get id and you would have the user a $_SESSION id. Then a page that handles collecting the $_GET['productid'] and adds it to the temp table.
Hope this helps
Posted 02 October 2006 - 07:46 PM
Guys, I really appreciated your comments re the site. I downloaded a few alternative browsers today including Firefox and i've made a few ammendments.
Please have a look and see if you can spot the difference. BTW I was using lots of DIVs, not layers but now i've popped all the product descriptions in tables. It still needs a bit of tweaking but its an improvement.
So thanks for your input.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users