Alejandro Troncoso
2021-07-31T22:29:17Z

Add_multiple_products_jumspeller.js

|
| let products = [7966034,7966035]; // Add products IDs here
| // This may take a while, so it's better to create a loader
| var setLoading = function(par){if(par){console.log("Inicio")}else{console.log("Inicio")}}
| setLoading(true);
| const addListToCart = (index, quantity) => {
| if(index < products.length){
| product = products[index];
| Jumpseller.addProductToCart(product, quantity, {}, {callback: addListToCart(++index,quantity)})
| }
| else {
| setLoading(false);
| }
| }
| addListToCart(0, 2)