Jump to content

Cart System


jwk811

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!
Link to comment
https://forums.phpfreaks.com/topic/25402-cart-system/
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.
Link to comment
https://forums.phpfreaks.com/topic/25402-cart-system/#findComment-115854
Share on other sites

Archived

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

×
×
  • 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.