Context passed to a checkout rule's process-checkout function when a matching line item is committed, giving it the line item to commit or adjust.
Group: E-commerce
Extends: AbstractCheckoutRuleContext
Properties
| Property | Returns | Description |
|---|---|---|
| lineItem | CustomCheckoutRuleLineItem | The line item this checkout rule is processing. |
Inherited from AbstractCheckoutRuleContext
Properties
| Property | Returns | Description |
|---|---|---|
| cart | Cart | The cart the checkout is being computed for. |
| purchaser | Profile | The profile making the purchase. |
| rule | CustomCheckoutRule | The checkout rule that this context is being evaluated for. |
| store | ECommerceStore | The e-commerce store the cart belongs to. |
Methods
getRule()
Returns: CustomCheckoutRule
The checkout rule that this context is being evaluated for.
getCart()
Returns: Cart
The cart the checkout is being computed for.
getPurchaser()
Returns: Profile
The profile making the purchase.
getStore()
Returns: ECommerceStore
The e-commerce store the cart belongs to.
Methods
getLineItem()
Returns: CustomCheckoutRuleLineItem
The line item this checkout rule is processing.
commitLineItem()
Returns: void
Adds the line item to the cart as a pending order, copying its unit cost, total cost and discount across, and persists the resulting order.
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.