Add multiple lines to the cart

Adds multiple lines to the cart. This method takes a single object as its argument with one property called lines. The value of lines is an array of Line objects.

var cart = container.getComponent("Cart");
cart.addLines({
		lines: [
			{
				quantity: 1,
				item: {
					internalid: 4938
				}
			},
			{
				quantity: 1,
				item: {
					internalid: 4936
				}
			}
		]
});

Leave a comment

Your email address will not be published. Required fields are marked *