Jump to content

Multiple Add Button


Recommended Posts

I want to add a function that adds multiple product attributes to the cart. But I always get "You already have the maximum quantity available for this product" even though:

 

1. I have already set "Allow Orders" when out of stock

2. Enabled "Allow ordering of out-of-stock products" at Preferences>Product

3. Put quantity of each attribute to 9999.

4. Followed this guide: http://nemops.com/prestashop-cart-multiple-products-quantities/

 

But still, the "You already have the maximum quantity available for this product" always appear.

 

I've done this function in Prestashop 1.5. It seems not to work on 1.6. I don't know why.

 

Please help. Thanks

 

My Code:

 

$(document).on('click', '.multi_add', function(e){
            e.preventDefault();

            var idProduct = $('.id_product').attr('data-id-product');

            $('.qty_box').each(function(){
                var qty = $(this).val();
            
              
 if (qty != 0) {

                ajaxCart.add(idProduct, $(this).attr('id'), true, null, qty, null);
             
  }

 });

post-787487-0-84903800-1411627107_thumb.png

Edited by chesspiece423 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...