Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add to Cart more than 1

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-04-2018, 08:52 AM
 
jmiranda jmiranda is offline
 

Newbie
  
Join Date: Jan 2018
Posts: 2
 

Default 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
__________________
X-Cart
Business 5.3.4.4
asia.serpent.com
Reply With Quote
  #2  
Old 04-09-2018, 10:38 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 04-09-2018, 11:32 PM
 
jmiranda jmiranda is offline
 

Newbie
  
Join Date: Jan 2018
Posts: 2
 

Default 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
__________________
X-Cart
Business 5.3.4.4
asia.serpent.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:31 AM.

   

 
X-Cart forums © 2001-2020