Q. I need a code snippet that I put on my site for the one-click purchase of a product.
<form action="cart.php?mode=add" method="post">
<input type="hidden" name="productid" value="____productid____">
<input type="hidden" name="cat" value="___CATID___">
<input type="hidden" name="page" value="___URL___">
<input type="hidden" name="mode" value="add">
<input type="hidden" name="amount" value="1">
<input type="submit" value="Submit" name="Submit">
</form>
"cat" and "page" are optional. ProductID has to be in the database before you can add the product to the cart.
"amount" - qty to add to the cart.
Admin FinestShops
Comments