PayPal Buy Now Button - dropdown quantites
is it possible to customize a PayPal Buy Now button with a dropdown where client can choose quantity?
<form action="https://www.sandbox.paypal.com/cg开发者_JS百科i-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="my_code">
<input type="image" src="https://www.sandbox.paypal.com/WEBSCR-640-20110401-1/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Well, yes, I'd almost say 'of course'.
Have a look at https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables to see which variables are accepted in a Website Payments Standards-type button. It seems you need the 'quantity' variable, so all you need to is create an option-select list:
<select name="quantity">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<!-- Etcetera.. -->
</select>
精彩评论