Configured instance of a custom checkout rule, pairing a CheckoutRuleType with the parameters and title an admin has set up for it in a store's checkout rules. Written in configuration as a "checkout-rule" element within a store's CheckoutRules, and evaluated during checkout by delegating to the CheckoutRuleType registered under checkoutRuleTypeId: checkAndAddItems contributes or adjusts cart line items while building the checkout preview, and processCheckout applies the effect of a committed line item when checkout is finalised. The optional promotionName restricts the rule to only apply when that promotion is active.

Group: E-commerce

Implements: CheckoutRule


Properties

PropertyReturnsDescription
checkoutRuleTypeIdStringIdentifier of the CheckoutRuleType this instance is configured against, used to look up the implementation that evaluates it during checkout.
idStringIdentifier for this configured rule instance, unique within the store's checkout rules.
managementPageTemplateStringPath to the template used to render this rule's management page in the admin UI.
paramsMap<String,Object>The configuration parameters for this rule instance, as defined by its CheckoutRuleType.
promotionNameStringThe name of the promotion this rule is restricted to, if any.
titleStringDisplay title for this rule instance, shown in admin configuration.

Methods

getId()

Returns: String

Identifier for this configured rule instance, unique within the store's checkout rules.

getCheckoutRuleTypeId()

Returns: String

Identifier of the CheckoutRuleType this instance is configured against, used to look up the implementation that evaluates it during checkout.

getParams()

Returns: Map<String,Object>

The configuration parameters for this rule instance, as defined by its CheckoutRuleType.

getPromotionName()

Returns: String

The name of the promotion this rule is restricted to, if any.

getTitle()

Returns: String

Display title for this rule instance, shown in admin configuration.

getManagementPageTemplate()

Returns: String

Path to the template used to render this rule's management page in the admin UI.

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