addItems

Method Signature String[] addItems(CartItem[] items);
Description
Adds the specified item(s) to the cart. The minimum amount of information that must be specified on the CartItem object is itemId and quantity. If you want to pass in options then you'll also need to populate those fields. The global cart variable is automatically included in the call to the server and updated after the call is complete.
Parameters CartItem[] items – The array of items to add to the cart.
Result String[] –All the errors that occurred while trying to add the items to the cart. If this array is empty then the addition was successful. If this array contains any values then you'll want to display the errors to the customer. This could include things like out of stock conditions, invalid item ids, etc. Even if the errors array contained something the global cart variable is updated.