【问题标题】:unable to pass the drop down values to Paypal无法将下拉值传递给 Paypal
【发布时间】:2015-10-23 12:13:49
【问题描述】:

这是一个小 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="&euro;7"><label>
<input type="radio" name="amount_1" value="7" />
</label></td>

<td title="&euro;10"><label>
<input type="radio" name="amount_1" value="10" /></label></td>
<td title="&euro;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="&euro;15"><label>
<input type="radio" name="amount_2" value="15" />
</label></td>

<td title="&euro;20"><label>
<input type="radio" name="amount_2" value="20" />
</label></td>
<td title="&euro;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>

【问题讨论】:

  • 可能后端(php?)没有恢复颜色的值?
  • 对不起,我没有关注你。什么“后端php”?通常使用表单中的下拉菜单将值直接传输到 Paypal。 on1 和 os1 通常是告诉 Paypal 获取值的所有键。

标签: paypal


【解决方案1】:

参考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>    

【讨论】:

  • 我认为它工作正常。它肯定曾经工作过,但现在它不再通过颜色。你能看看kalikalos.com/eStore/book-product.html,看看我那里还有什么问题吗?
  • 现在它又开始工作了!一定是浏览器的问题,代码看起来不错。
  • 现在,我在产品列表中添加了第三项(袜子),代码不再适用于靴子或袜子。我究竟做错了什么?我想显示代码更改,但我似乎无法像原来的问题那样附加我的代码。我需要创建一个新问题吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-10-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多