亚马逊购物车中的数量?
您好,我想更改 AWS 订单中的数量。我使用了下面的表格,它可以很好地向购物车添加 1 件商品,但当我尝试将其数量更改为 2 件时,它说我的购物车中没有商品。我做错了什么?谢谢。
<form method="GET" action="http://www.amazon.com/gp/aws/cart/add.html" id="Quantity">
<input type="hidden" name="AWSAccessKeyId" value="Access Key ID" />
<input type="hidden" name="AssociateTag" value="Associate Tag" />
<?php
echo "<input type='hidden' name='ASIN.1' value='".$itemid."'/>";
?>
<input type="hidden" name="Quantity.1" value="1"/><br/>
<input type="image" src="buynow.gif" value="Submit" alt="Submit">
</form>
Hi I'd like to change the quantity in an AWS order. I've used the form below and that works fine for adding 1 item to the cart, but when I try to change it to a quantity of 2 it says there are no items in my cart. What am I doing wrong? Thanks.
<form method="GET" action="http://www.amazon.com/gp/aws/cart/add.html" id="Quantity">
<input type="hidden" name="AWSAccessKeyId" value="Access Key ID" />
<input type="hidden" name="AssociateTag" value="Associate Tag" />
<?php
echo "<input type='hidden' name='ASIN.1' value='".$itemid."'/>";
?>
<input type="hidden" name="Quantity.1" value="1"/><br/>
<input type="image" src="buynow.gif" value="Submit" alt="Submit">
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的数量尚未填充。我会将您的项目放入一个数组中,并将它们存储在会话对象中,以在站点范围内保留这些项目。然后,当您想要显示购物车商品时,请务必在标签中包含您的数量指令;像这样 -
You quantity is not being populated. I would place your items in an array and store them in session objects to preserve those items site-wide. Then, when you want to display your cart items, be sure to include your quantity directive in the tag; like so -
<input type="hidden" name="Quantity.1" value=". count($_SESSION['items']['id'] ."/>