Select Item Button to--->Cart
I was wondering if some patient someone here might be able to help me with something before I pull my hair out.
I would like to know what the easiest/quickest way to create a simple shopping cart that will allow me to click an item button that contains all of my product info: itemid, customerid etc. that opens a view cart page that can have additional items added to it and removed (continue shopping or remove item). I would like from the same cart page be able to select shipping option and have shipping and items calculated on that page to a grand total amount. Then on click checkout send the informtion via: "method:get" to the credit card proccessor. Basiically what I want to do is what is done for most Pay Pal sites except I want to send the info to a different proccessor.
The specific problem I am having trouble figuring out (for about 72 hours and counting) is how to keep items in the cart when the customer goes to make more selections. I realize I need a session_start() function on all the pages which I have done but whenever I return to the "cart" page it has removed the previous selection and added the new one.
I have downloaded some of the open souce carts out there and tinkered with them but all of the ones I have found in php are more elaborate then I need. I don't need admin pages or even customer pages etc that will all be kept by the proccessor.
Any help with this would be soooooooooooo greatly appreciated.
You guys here are aloways a great help to me.
Thanks
NYColt
Suzanne posted this at 19:42 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
http://www.sitepoint.com/books/
Go get this. It will help you immensely.
NYColt posted this at 19:52 — 21st April 2003.
They have: 42 posts
Joined: Dec 2002
Thanks Suzanne,
But I have read a few similiar books on PHP from cover to cover, I was just hopping for a push in the right direction on this I guess.
Like should I send each slection to an array on the cart page and is there a need to store the selctions temporarialy to a flat file, that kind of stuff...I think with a bit of a shove I will be able get it done. I just don't want to start off for GO in the wrong direction.
NYColt
Suzanne posted this at 21:53 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
Heh -- this book, chapter 12, points you in the right direction.
If you're using a database, you'd use the session information to track the user, put all the information in the database and if they delete things, delete them. You can also use a login to make it easier for them (and you) to hold the data.
Sessions are better, but you can also use cookies to keep things in their cart. Using sessions, you need an id -- session id. Then you can track things.
Anyway, chapter 12 explains it a helluva lot better than I can.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.