LineItem
A line item contains a single Item and the quantity that was ordered.
| Field | Description | Modifier and Type |
|---|---|---|
attributedTerm | Word to associate with this item that is then used in SmartSearch. | java.lang.String |
item | The item being ordered. It must be an instance of a concrete subclass of Item, such as Product. | Item |
quantity | The quantity of the item being ordered. | java.lang.Integer |
The quantity of the item being ordered.
The item being ordered. It must be an instance of a concrete subclass of Item, such as Product.
Word to associate with this item that is then used in SmartSearch.
Builds a line item which contains the specified number of units of a product in an order. This method only builds a data object. To use it, pass it to one of the tracking methods like Context.addToCart(com.evergage.android.promote.LineItem).
Parameters:
| Parameter | Description | Required? |
|---|---|---|
item | The Item (such as Product) being ordered | Yes |
quantity | The number of units of the product this line item represents | No |
When you pass a line item with product to addToCart, removeFromCart, viewCart, or purchase, the product must have a non-null price. If the product doesn’t have a price, the SDK drops a product-backed line item before it sends the event, and logs an error in Logcat identifying the affected product ID.