I am building a shopping cart from scratch. The programming is no problem for me but the logistics have me stumped on one item. I'm hoping someone here can help;
When the user clicks "add to cart" on an item, should I store this item in a session variable? If so, do I build a string of comma separated sku numbers, and explode the string and run through a loop to get each items info when displaying the cart?
Then when they are ready to check out, I need to store this info in a database so we can extract it later to fill the order. What's the best way to do this? Say they have seven items in their order and some of them have quantities of more than one... what is the best way to store this so it can be retrieved by the order filling page that we pull up and print & pack?