jwk811 Posted October 28, 2006 Share Posted October 28, 2006 I understand that to make a cart system i will need to use sessions and arrays but i'm not sure of how to put it all together.. would i make the "catolog" just be a big array and each "Add to Cart" button take that piece from the array to pass it on to the cart? is that how it works?if so then when i pass that information on to the cart i would have to use the POST variable to apply that item that i got from the array, right? then how would i keep that information there when the customer leaves their cart to shop for more? could someone please tell me that and tell me if im right on this so far? thanks! Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted October 28, 2006 Share Posted October 28, 2006 shopping carts are much easier than many make out. I would use a database for teh products and simply create an array with the product id as a key and iits value being the number of that prodcuct - assigin it to a sesion and hey presto you have a shopping cart. Quote Link to comment Share on other sites More sharing options...
jwk811 Posted October 28, 2006 Author Share Posted October 28, 2006 i dont understand.. could you give me an example or piece of script that i could see? Quote Link to comment Share on other sites More sharing options...
jwk811 Posted October 28, 2006 Author Share Posted October 28, 2006 i just need to know how would i keep the data on one page so when they go back it will be there Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.