Jump to content

Archived

This topic is now archived and is closed to further replies.

nickholt1972

Setting up a (fairly) simple shopping basket page

Recommended Posts

I've got an online shop (at [url=http://www.appletreenappies.co.uk/store.php]www.appletreenappies.co.uk/store.php[/url] if you're interested), currently all my products have a 'Buy' button which links to Paypal but I want to set up my own custom built shopping basket. I know i'll need to use session variables and arrays but beyond that i'm worryingly clueless.

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?

Thanks,
Nick.

Share this post


Link to post
Share on other sites
Off Topic: I checked out your page in Firefox, and oh dear!....  :o

I'm guessing you're using layers as I navigated to this page....
http://www.appletreenappies.co.uk/products.php?product=multisize

I can't see any of the product descriptions as they're obscured by the size/colour/fastening box :(

Regards
Huggie

Share this post


Link to post
Share on other sites
Yea i use firefox as well and see what he means. It is worth downloading firefox and opera and testing your site when making it, also ie 7 is comming out soon and it is something else to think about.

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

Share this post


Link to post
Share on other sites
HuggieBear, steveclondon,

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.

http://www.appletreenappies.co.uk/products.php?product=multisize

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.