Providing a price/amount field next to the purchase button
« Return to Name-your-price products or donations
If you would prefer to show a price amount field next to the item's Add to Cart or Buy Now button, where the buyer can fill in the amount before clicking the button, you can accomplish that with a bit of custom HTML code. First, you will need to obtain the href=
URL from the item's standard button code, as we explain here. Then, you can use that URL as the action=
URL in the following HTML code:
Add to Cart button:
The amount buyers enter here will be added to the item's base Price setting (or Min. Price if you'd enabled "Let buyer edit price"), so if you expect buyers to enter the actual price they will pay, be sure to set the item's Price (Min. Price) at 0.00 in Seller Admin.<form action="https://www.e-junkie.com/ecom/gb.php?i=YYYYYY&c=cart&cl=XXXXXX&ejc=2" method="POST" target="ej_ejc">
Amount:<br>
<input name="amount" type="text" value=""><br>
<input src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" onclick="javascript:return EJEJC_lc(this.parentNode);" alt="Add to Cart" title="Add to Cart" border="0" type="image"></form>
Buy Now button:
The amount buyers enter here will replace the item's base Price setting, and they will be allowed to proceed to checkout and pay whatever price they enter; however, our system would refuse to process the order if the price paid is less than the item's base Price setting (Min. Price), so if you expect buyers to enter any arbitrary price amount, be srue to set the item's Price (Min. Price) at 0.00 in Seller Admin.<form action="https://www.e-junkie.com/ecom/gb.php?i=YYYYYY&c=single&cl=20545" method="POST" target="ejejcsingle">
Amount:<br>
<input name="amount" type="text" value=""><br>
<input src="https://www.e-junkie.com/ej/x-click-butcc.gif" alt="Pay Now" title="Pay Now" border="0" type="image"></form>
Prefilled amount:
To provide a prefilled/suggested amount in the field, which the buyer can change if they wish before clicking the button, simply specify that amount in the value=""
attribute of the <input name="amount">
tag, like so:
<input name="amount" type="text" value="12.34">