Table of Contents

Class FreeShippingPromotionRuleUtils

Namespace
Kentico.Xperience.Admin.DigitalCommerce
Assembly
Kentico.Xperience.Admin.DigitalCommerce.Shared.dll

Utility methods for evaluating free shipping promotion rule properties.

public static class FreeShippingPromotionRuleUtils
Inheritance
object
FreeShippingPromotionRuleUtils

Methods

GetItemsMeetingMinimumRequirement(FreeShippingPromotionRuleProperties, IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>>)

Returns the items that earn the reward under the properties minimum purchase requirement.

public static IReadOnlyList<IPriceCalculationResultItem<ProductIdentifier, ProductData>> GetItemsMeetingMinimumRequirement(FreeShippingPromotionRuleProperties properties, IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>> items)

Parameters

properties FreeShippingPromotionRuleProperties

Free shipping promotion rule properties to evaluate against.

items IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>>

The cart items that the requirement counts.

Returns

IReadOnlyList<IPriceCalculationResultItem<ProductIdentifier, ProductData>>

For a minimum item price requirement, the items whose unit price after all discounts reaches the value. For the other requirements the items qualify together, so all of them.

MeetsMinimumRequirement(FreeShippingPromotionRuleProperties, IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>>)

Determines whether the given items, taken together, meet the properties minimum purchase requirement.

public static bool MeetsMinimumRequirement(FreeShippingPromotionRuleProperties properties, IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>> items)

Parameters

properties FreeShippingPromotionRuleProperties

Free shipping promotion rule properties to evaluate against.

items IEnumerable<IPriceCalculationResultItem<ProductIdentifier, ProductData>>

The cart items that the requirement counts. An empty collection never meets the requirement.

Returns

bool

true if the items meet the requirement, otherwise false.

Remarks

A price requirement counts the line subtotal after all discounts, because the free shipping calculation step runs after the order promotion step. If the calculation applies no order discount, the value is equal to the price after the line discounts.