Cart policies

Current version: 10.2

The Commerce Engine encompasses extensible services that enable you to customize commerce functionality.

Note

Do not extend or inherit from out-of-the-box policies; instead, create your own. You can change the values in a policy by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined and then re-running Bootstrap.

The Carts plugin defines the following policies.

Policy

Description

Properties / Default Values

KnownCartAdjustmentTypesPolicy

Defines the names of the different cart adjustments.

Fee / "Fee"

Discount / "Discount"

Tax / "Tax"

Fulfillment / "Fulfillment"

LineQuantityPolicy

Defines how cart line quantities should be handle by the system.

Minimum / 0

Maximum / 100

AllowDecimal / false

RollupCartLinesPolicy

Defines whether the system should roll cart lines of the same product into one cart line.

Rollup / true

PurgeCartsPolicy

Defines the threshold (in number of days) when empty or abandoned carts become eligible for deletion.

AbandonedCartsThreshold: "14"

EmptyCartsThreshold: "2"

CalculateCartPolicy

Defines whether and when the Commerce Engine recalculates the cart for enhanced performance. Processing of promotions, line prices, shipping costs, or other cart operations result in the Commerce Engine recalculating the price of the cart. For optimized performance, the engine recalculates the price cart 60 seconds after it expires.

AlwaysCalculate: / false

Expiry: 60

Do you have some feedback for us?

If you have suggestions for improving this article,