tec Posted July 14, 2005 Share Posted July 14, 2005 hey there everyone, this may be a stupid question, but what the heck. I have placed this code $addtocartbutton in my template, I assumed it would add items to the cart also, but when you click on the button, it doesnt do anything. Any ideas? Quote Link to comment Share on other sites More sharing options...
shaunklink Posted July 21, 2005 Share Posted July 21, 2005 hey there everyone, this may be a stupid question, but what the heck. I have placed this code $addtocartbutton in my template, I assumed it would add items to the cart also, but when you click on the button, it doesnt do anything. Any ideas? <{POST_SNAPBACK}> Probably not the best advice, but this is what I did: <form name="cart_quantity" action="http://i-muffs.com/product_info.php?products_id=28&action=add_product" method="post"> <input type="hidden" name="products_id" value="28"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> I got this code from the product_info.php line for actually adding to cart. I'm sure you can change the product ID to fit whatever you want. the cart im working on has only 1 product so it's easy that way. one drawback that I think others might agree on is the lack of a osCid variable being passed in the link. I'm using STS as well and I haven't yet figured out how to go about this....if you know, please tell me. I know how to make a custom box if that helps. Quote Link to comment Share on other sites More sharing options...
tec Posted July 21, 2005 Author Share Posted July 21, 2005 Probably not the best advice, but this is what I did: <form name="cart_quantity" action="http://i-muffs.com/product_info.php?products_id=28&action=add_product" method="post"> <input type="hidden" name="products_id" value="28"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> I tried adding two of these forms to my product_info.php like this ( i have 2 products) <form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=31&action=add_product" method="post"> <input type="hidden" name="products_id" value="31"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> <form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=30&action=add_product" method="post"> <input type="hidden" name="products_id" value="30"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> the first one will add the item to the cart, the second one does not work Quote Link to comment Share on other sites More sharing options...
shaunklink Posted July 22, 2005 Share Posted July 22, 2005 I tried adding two of these forms to my product_info.phplike this ( i have 2 products) <form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=31&action=add_product" method="post"> <input type="hidden" name="products_id" value="31"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> <form name="cart_quantity" action="inmyspace.net/product_info.php?products_id=30&action=add_product" method="post"> <input type="hidden" name="products_id" value="30"><input type="image" src="images/orderButton.gif" border="0" alt="Order Now" title=" Order Now "> </center> </form> the first one will add the item to the cart, the second one does not work <{POST_SNAPBACK}> hmm, I really dont know... What about the $startform and $endform elements that your supposed to use. Quote Link to comment Share on other sites More sharing options...
gmltw Posted February 23, 2007 Share Posted February 23, 2007 hmm, I really dont know... What about the $startform and $endform elements that your supposed to use. shaunklink - Thank you for your post! I was having the same problem with the $addtocartbutton not working. When I looked for the $startform element it was not there. Now that I have added that element it works. Thank you! 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.
Note: Your post will require moderator approval before it will be visible.