Jump to content

Archived

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

jwk811

Cart System

Recommended Posts

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!

Share this post


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

Share this post


Link to post
Share on other sites
i dont understand.. could you give me an example or piece of script that i could see?

Share this post


Link to post
Share on other sites
i just need to know how would i keep the data on one page so when they go back it will be there

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.