emma57573 Posted June 28, 2008 Share Posted June 28, 2008 I need some one to point me in the right direction. I have an 'add to cart button' on my site http://www.misi.me.uk/product_desc.php?id=145 I know how to add more than one item if the user is 'logged' in so I can call it from the database but how do I do it if the user isnt logged in. I want anybody to be able to add to the cart and then log in or register on checkout. I know you can do this with cookies, Im just clueless and I cant seem to find a tutorial that explains it in simple english. Link to comment https://forums.phpfreaks.com/topic/112312-solved-php-shopping-cart-cookies/ Share on other sites More sharing options...
phpzone Posted June 28, 2008 Share Posted June 28, 2008 Store the details in a Session variable. I usually use the product_id and the quantity, its all you need to store. $_SESSION[ $prod_id ] = $quantity; it shouldn't matter whether they are logged in or not. Link to comment https://forums.phpfreaks.com/topic/112312-solved-php-shopping-cart-cookies/#findComment-576636 Share on other sites More sharing options...
emma57573 Posted June 28, 2008 Author Share Posted June 28, 2008 Thanks, Ive managed to scamble something up with a tutorial I found Link to comment https://forums.phpfreaks.com/topic/112312-solved-php-shopping-cart-cookies/#findComment-576638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.