Guest Posted November 19, 2004 Share Posted November 19, 2004 On the page that lists inventory in a particular category, I have added an "Add to Basket" button for people who don't want to look at "more info", but just want to add the item to their cart, but I cannot get it to actually add anything to the cart. Here's the code I am trying to use: ....r: hand;\" onClick=\"location.href='view_cart.php?add=$product'\"><a h.... but when I check the link, it states the category and not the particular product. It looks like it's taking the $product value as the category. (but, meanwhile, the button right beside it is ok.) I see the "more info" button is coded like: ....: hand;\" onClick=\"location.href='view_product.php?product=$product'\"><a... where product=$product anyone have ideas on how to "add=$product"? I tried inserting" ...>"; product=$product echo"... right before the add=$product to define it, but it didn't work. Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted November 20, 2004 Share Posted November 20, 2004 You've almost got it. You need to add a quantity to your link. Try using this code instead: view_cart.php?add=$product&quan=1 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 20, 2004 Share Posted November 20, 2004 Thanks! That did it! X 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.