Sameer Ahmed Siddiqui
10/04/2019, 5:22 AMcart.addLine({
line: {
quantity: accessory.qty,
item: {
internalid: accessory.item
}
}
})
Thi following code failed to add lines to the cart
var lines = [];
accessories.forEach(function(accessory) {
lines.push({
line: {
internalid: accessory.item,
quantity: accessory.qty,
item: {
internalid: accessory.item
}
}
});
});
cart.addLines(lines).then(function() {
console.log("Item added!");
});
Sohan Kumar Dash
10/05/2019, 8:04 PMSohan Kumar Dash
10/05/2019, 8:06 PMSteve Goldberg
10/07/2019, 10:25 AMaddLines()
accepts an array of items passed _as an object in the form of Cart.addLines({lines: lines})
. You just seem to be passing an array.