I am using _amazon_store_add_to_cart($asin); from a custom module. It works fine but when I try to increase the quantity from 1 to 2 it updates the quantity to 3 with the following messages:
Cart quantity updated to 2
Item B0014PDNV8 has been added to your cart.
Cart quantity updated to 2
Cart quantity updated to 3
Item B0014PDNV8 has been added to your cart.
I use link /add2cart/B0014PDNV8 and function add2cart calls _amazon_store_add_to_cart('B0014PDNV8'). The behavior is a little different when there are multiple items in the cart.
I suspect that the add_to_cart function was designed to to be invoked via the AJAXy interface and I am missing something. Please let me know if there is an easy way to correct this.
Thanks for the great module and your work on changing the Amazon API for the transition...
Comments
Comment #1
rfayThe _ in front *does* mean that it's not a public API function :-)
But I will look at this and see if I can make it better for you when I next spend a little time with the code.
Thanks for the nice note.
-Randy
Comment #2
rfayI'm going to mark this "won't fix". Doing some work in that area though that might be related to this. @the_g_bomb found a bug there, and that led to another.
#878048: Confirmation Message After Cart Update Quantity Incorrect
#944294: Add to cart 2nd and following times results in "Cart quantity updated to" empty
If you still have this problem and want to solve it, patches are welcome.