更改添加的默认数量"添加到购物车"在PayPal结帐页面

时间:2017-04-16 09:29:29

标签: paypal cart

我有这个"加入购物车"贝宝按钮:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div align="center">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="email@host.com">
    <input type="hidden" name="item_name" value="An item to buy">
    <input type="hidden" name="item_number" value="per dozen">
    <input type="hidden" name="amount_1" value="48.00">
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit7" alt="Make payments with PayPal - it's fast, free and secure!">
    <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
    <input type="hidden" name="add" value="1">
</div>

如果添加的数量是1:

,它可以正常工作
<input type="hidden" name="add" value="1">

但是如果我尝试将默认数量添加到12:

,它就不起作用
<input type="hidden" name="add" value="12">

我该如何解决这个问题?感谢。

2 个答案:

答案 0 :(得分:0)

尝试下面的代码,它会将默认数量更改为12:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div align="center">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="email@host.com">
<input type="hidden" name="item_name" value="An item to buy">
<input type="hidden" name="item_number" value="per dozen">
<input type="hidden" name="amount" value="48.00">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit7" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
<input type="hidden" name="add" value="1">
<input type="hidden" name="quantity" value="11">
</div>

要了解有关PayPal按钮参数的更多信息,请查看PayPal documentation

答案 1 :(得分:0)

NIRAJ你忘了用

<./form>

结束

我没有足够的声誉评论你的答案。我希望这很好。