Pipelet AddProductToBasket
Adds a Product to the Basket. The pipelet creates and returns a ProductLineItem, by assigning the specified Product and Quantity to the specified Basket. If this process fails, then the pipelet exits with an ERROR. Otherwise the pipelet adds the new ProductLineItem to a Shipment that is located in the following manner: If a Shipment is provided then it is used, otherwise the standard Shipment in the Basket is used. If none exists, then a new one is created and assigned to the Basket. Instead of providing a Product it is possible to provide a ProductListItem, and then a ProductLineItem is created with a reference to the ProductListItem. This reference is used later, during order creation to create ProductListItemPurchase object, i.e. to update the count of purchased items. If the product is already in the basket, the pipelet either increments the quantity of the existing product line item or creates a new product line item, based on the site preference 'Add Product Behavior'. For option products and product bundles containing variation masters, the pipelet creates a new product line item regardless of the site preference.
Group:
Basket
Flags:
Error Connector
Transaction Required
Input Parameters
Product  :  Product (Optional)
The product that is to be added to the basket. (Note: Either a Product or a ProductListItem has to be provided.)
Quantity  :  Number (Optional)
The quantity of the product.
Basket  :  LineItemCtnr (Required)
The basket to add the product to.
ProductOptionModel  :  ProductOptionModel (Optional)
The option model of the product that is to be added to the basket.
Shipment  :  LineItemGroup (Optional)
Specifies the shipment of the product should be added to. If not specified, the pipelet automatically adds the product to the default shipment of the basket.
Category  :  CatalogCategory (Optional)
Category context to be stored with the product line item.
ProductListItem  :  ProductListItem (Optional)
The product list item whose associated product is to be added to the basket. (Note: Either a product or a product list item, but at least one of them have to be specified.)
ProductInventoryList  :  ProductInventoryList (Optional)
An optional inventory list. The inventory list id will be stored at the product line item and will be used for reservation.
Output Parameters
ProductLineItem  :  ProductLineItem  :  (Required)
The newly created product line item.