Add to Cart more than 1
I use this all time
<form action="?target=cart" method="post" accept-charset="utf-8" class="custom-add2cart"> <input type="hidden" name="target" value="cart" /> <input type="hidden" name="action" value="add" /> <input type="hidden" name="product_id" value="5" /> <div class="add-button-wrapper widget-fingerprint-product-add-button"> <button type="submit" class="btn regular-button regular-main-button add2cart submit"> <span>Add to cart</span> </button> </div> </form> I have a case where i need to add 2 of the same item. Is there a hidden variable for quantanty Thanks Jorge |
Re: Add to Cart more than 1
Yes, you can use the "amount" parameter to pass the quantity:
https://[YOUR_DOMAIN]/cart.php?target=cart&action=add&product_id=15&amou nt=2 |
Re: Add to Cart more than 1
Thank you that works great now. I was able to use those calls with Jquery/AJax and I now let users upload a shopping carts from a csv file.
You should consider adding this as a feature in the future. Here where i did it https://asia.serpent.com/xcart/uploadcart.html |
All times are GMT -8. The time now is 06:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.