0

I have a simple page set up where I have product X which is £19.99. What I want is for users to be able to add extras to it (through tickboxes), as a result increasing the price by £9.99 each time (though the first addition will be free).

I am using PayPal's buy now button and am sure it is possible, though I don't quite know how to approach it.

The total price should be updated when the checkboxes are checked etc.

Please advise me on how to do this. Many thanks :)

geneCheck is the checkboxes with that class (e.g. <input type="checkbox" class="geneCheck" id="KLO">)

basePrice = 19.99
totalPrice = basePrice + (geneCheck * 9.99) - 9.99)

Send totalPrice to PayPal "value"
Send Id of checkboxes to Options field with classes of geneCheck

So if the user clicks three checkboxes, for example, the totalPrice should read: 39.97
And the user should be able to pay with paypal for this amount.
DONE!!
4

1 回答 1

0

您可以使用 Javascript 更改字段值(前提是您没有使用加密按钮)。当用户提交表单时,Paypal 将收到更新的值。

于 2013-10-31T16:46:20.023 回答