I would like to add an "Add to Cart" button in the product description, so from the product Admin page rather than when editing the product.tpl file. Is this possible, and if so can anyone tell me the code I need?
I have tried the following (without really knowing what I am doing, I must admit), and it adds the button but throws a "page not found" error:
Code: Select all
<form action="<?php echo $action; ?>" enctype="multipart/form-data" id="product" method="post">
<input name="quantity" size="3" type="hidden" value="1" /> <a class="button" id="add_to_cart" onclick="$('#product').submit();"><span>Add to Cart</span></a> <input name="product_id" type="hidden" value="<?php echo $products[$j]['id']; ?>" /></form>