Typescript SDK Type Docs
    Preparing search index...

    Interface CartDiscountValueRelative

    Discounts the CartDiscountTarget relative to its price.

    interface CartDiscountValueRelative {
        applicationMode?: DiscountApplicationMode;
        permyriad: number;
        type: "relative";
    }

    Hierarchy (View Summary)

    Index

    Properties

    applicationMode?: DiscountApplicationMode

    Indicates how the discount applies when using CartDiscountPatternTarget.

    - If the mode is `IndividualApplication`, the discounted percentage is applied on each unit's price. The units matching the `triggerPattern` are not considered.
    - If the mode is `ProportionateDistribution` and `EvenDistribution` the discounted value is calculated from the total value of the units matching the `targetPattern` and distributed among the units matching the `targetPattern` or `triggerPattern`. These modes are allowed only if [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) `triggerPattern` is non-empty.
    
    permyriad: number

    Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

    type: "relative"