Jump to content

Setting up a (fairly) simple shopping basket page


nickholt1972

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.

Link to comment
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
Link to comment
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
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.