- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
addLineItems - Cart Module Reference
This documentation provides a reference to the addLineItems
method. This belongs to the Cart Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
addLineItems(data): Promise<CartLineItemDTO[]>#
This method adds a line item to a cart
Example#
Parameters#
The line item to create and add to the cart.
The cart is specified in the cart_id
field.
cart_id
field.Returns#
Promise
Promise<CartLineItemDTO[]>The added line item.
Promise
Promise<CartLineItemDTO[]>addLineItems(data): Promise<CartLineItemDTO[]>#
This method adds line items to carts.
Example#
Parameters#
data
CreateLineItemForCartDTO[]The line item to create and add to the carts.
The cart is specified in the cart_id
field.
data
CreateLineItemForCartDTO[]cart_id
field.Returns#
Promise
Promise<CartLineItemDTO[]>The added line items.
Promise
Promise<CartLineItemDTO[]>addLineItems(cartId, items, sharedContext?): Promise<CartLineItemDTO[]>#
This method adds line items to a cart.
Example#
Parameters#
cartId
stringThe cart's ID.
items
CreateLineItemDTO[]The line items to be created and added.
items
CreateLineItemDTO[]Returns#
Promise
Promise<CartLineItemDTO[]>The added line items.
Promise
Promise<CartLineItemDTO[]>Was this page helpful?