这是一个小html,应该发送产品信息(单位数量,两个产品的大小和颜色)到Paypal。单位和大小通过Paypal,但由于某种原因下拉菜单与颜色没有。任何人都可以在我的代码中看到错误吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> Order Test Product</title>
<meta name="verify-v1" content="n3Dpx4NklZjg5p/Tq7h1q+Oj6Ml83crtkO/PwepVQ6Y=" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name= "robots" content="index,nofollow" />
</head>
<body>
<h1> Order your footwear here </h1>
<h2> Select your size, colour and quantity desired, then click PAY NOW </h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<table width="80%" border="1" align="center">
<tr><th>Product</th><th>Color</th><th>Quantity</th><th width="90">Not Ordeed</th><th>Size Small</th><th>Size Medium</th><th>Size Large</th></tr>
<tr><th> Shoes</th>
<td> <input type="hidden" name="on1" value="color" />
<select name="os1">
<option value="---">Select Color </option>
<option value="brown-shoes">Brown </option>
<option value="black-shoes">Black </option>
<option value="White-shoes">White </option>
</select></td>
<td><input type="text" size="2" maxlength="3" name="quantity_1" /></td>
<td><label>
<input type="radio" name="amount_1" value="0" checked="checked" /></label></td>
<td title="€7"><label>
<input type="radio" name="amount_1" value="7" />
</label></td>
<td title="€10"><label>
<input type="radio" name="amount_1" value="10" /></label></td>
<td title="€13"><label>
<input type="radio" name="amount_1" value="13" /></label></td>
</tr>
<tr>
<th>Boots</th>
<td><input type="hidden" name="on2" value="color" />
<select name="os2">
<option value="---">Select Color </option>
<option value="brown-boots">Brown </option>
<option value="black-boots">Black </option>
<option value="White-boots">White </option>
</select></td>
<td><input type="text" size="2" maxlength="3" name="quantity_2" /><br /></td>
<td><label>
<input type="radio" name="amount_2" value="0" checked="checked" />
</label><br /><br /></td>
<td title="€15"><label>
<input type="radio" name="amount_2" value="15" />
</label></td>
<td title="€20"><label>
<input type="radio" name="amount_2" value="20" />
</label></td>
<td title="€25"><label>
<input type="radio" name="amount_2" value="25" />
</label></td>
</tr>
</table>
<br /><br />
<input type="image" src="../eStore/paynow.jpg" name="submit" alt="PayPal - The safer, easier way to pay online." />
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="business" value="info@kalikalos.com" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="item_name_1" value="Shoes" />
<input type="hidden" name="item_name_2" value="Boots" />
</form>
</body>
</html>
答案 0 :(得分:0)
请参阅Paypal not picking up selection choices,您需要更改代码:
<tr><th> Shoes</th>
<td> <input type="hidden" name="on0_1" value="color" />
<select name="os0_1">
<option value="---">Select Color </option>
<option value="brown-shoes">Brown </option>
<option value="black-shoes">Black </option>
<option value="White-shoes">White </option>
</select></td>
.....
<tr>
<th>Boots</th>
<td><input type="hidden" name="on0_2" value="color" />
<select name="os0_2">
<option value="---">Select Color </option>
<option value="brown-boots">Brown </option>
<option value="black-boots">Black </option>
<option value="White-boots">White </option>
</select></td>