Reputation: 296
It is possible to add single product using the ajaxCart.add function but it currently doesn't allow to add multiple products in one go. I have to make several ajax calls to update the cart which is not desirable, considering im building a bulk product order section.
Thanks
Upvotes: 1
Views: 1663
Reputation: 111
You can do it by adding factory function in jQuery or by using quantity property in Prestashop and making it calculate in jQuery.
Upvotes: 0
Reputation: 1511
Checking out the function in ajax-cart.js. It only accepts the single product id as part of the function call. You're gonna have to override this function and implement bulk adding yourself as you cannot achieve it using the default code from PrestaShop.
add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist){
Upvotes: 2