Removing Items From a Cart
A customer might, at times, decide to remove some or all of the items in their remote shopping cart.
To remove all items from a cart
-
Use
CartClear
to remove all items from a cart.http://ecs.amazonaws.com/onca/xml? Service=AWSECommerceService& AWSAccessKeyId=
[AWS Access Key ID]
&AssociateTag
=ws& Operation=CartClear& CartId=002-2041347-9034467& HMAC=[HMAC]
If the customer, however, wants to remove only some of the items in their
cart, use
CartModify
and set the
Quantity
and
CartItemId
parameters appropriately, for example:
http://ecs.amazonaws.com/onca/xml? Service=AWSECommerceService& AWSAccessKeyId=[AWS Access Key ID]
& Operation=CartModify& CartId=[cart ID]
& Item.1.CartItemId=U1I8M9790QFDO7& Item.1.Quantity=15& Item.2.CartItemId=U3K5GRHEXU6FHK& Item.2.Quantity=18
This request sets the quantity of the item specified by the
CartItemId
to 0 thereby removing it from the cart.