Start a conversation

One-click purchase of a product

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">

"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.

Choose files or drag and drop files
Was this article helpful?
  1. Admin FinestShops

  2. Posted
  3. Updated