Custom checkout rule contributed by a repository app, registered through controllerMappings and run by the e-commerce checkout process to add or adjust cart line items. checkAndAddItems is called while building the checkout preview, and processCheckout is called when a matching line item is committed; both delegate to JavaScript functions named by checkItemsFn and processCheckoutFn, passing a context bean that the script uses to read and add line items.

Implements: CheckoutRuleType


Properties

PropertyReturnsDescription
checkItemsFnStringName of the JavaScript function called to check and add line items while the checkout preview is being built.
fieldsList<ExtraField>Extra fields the rule contributes to the checkout form, used to collect additional input from the customer.
idStringUnique identifier of this checkout rule type.
processCheckoutFnStringName of the JavaScript function called to process a matching line item when checkout is committed.
titleStringDisplay title of this checkout rule type, shown to the customer or admin.

Methods

getId()

Returns: String

Unique identifier of this checkout rule type.

getFields()

Returns: List<ExtraField>

Extra fields the rule contributes to the checkout form, used to collect additional input from the customer.

getCheckItemsFn()

Returns: String

Name of the JavaScript function called to check and add line items while the checkout preview is being built.

getProcessCheckoutFn()

Returns: String

Name of the JavaScript function called to process a matching line item when checkout is committed.

getTitle()

Returns: String

Display title of this checkout rule type, shown to the customer or admin.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.