Defines a pluggable custom checkout rule, evaluated during checkout to add or adjust cart line items and, when a resulting line item is committed, to apply its effect to the order. checkAndAddItems runs while building the checkout preview and may contribute additional line items to the cart, such as rewards or vendor-specific charges. processCheckout runs when checkout is finalised and applies the effect of a previously added line item, such as persisting a record or redeeming a reward. Implementations are registered against a CustomCheckoutRule and can present extra input fields to the customer via getFields.
Properties
| Property | Returns | Description |
|---|---|---|
| fields | List<ExtraField> | Extra fields this rule type contributes to the checkout form, used to collect additional input from the customer. |
| id | String | Unique identifier of this checkout rule type. |
| title | String | Display title of this checkout rule type, shown to the customer or in admin configuration. |
Methods
getId()
Returns: String
Unique identifier of this checkout rule type.
getTitle()
Returns: String
Display title of this checkout rule type, shown to the customer or in admin configuration.
getFields()
Returns: List<ExtraField>
Extra fields this rule type contributes to the checkout form, used to collect additional input from the customer.