...

View Full Version : Add/Delete Items



Zeater
11-21-2007, 01:54 PM
I have the following code, that displays a message whether a users shopping cart contains items or not.

How do I add/delete items from the shopping cart, upon the appropriate product link being clicked? If a items is already in the cart, how do I display a message notifying the user?


$cart = $_SESSION['cart'];
if (!$cart)
{
echo "You have no items in your shopping cart!";
}
else
{
echo "You have items in your shopping cart";
}

Fumigator
11-21-2007, 05:38 PM
You really don't need to create multiple threads over this issue. I replied to this other thread with a suggestion on how to modify the way your cart is working to make deleting and adding items much easier.

http://codingforums.com/showthread.php?t=128292



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum