Script: Class dw.campaign.PercentageDiscount

Class PercentageDiscount

Represents a percentage-off discount in the discount plan, for example "10% off all T-Shirts".

Properties

percentage : Number Read Only

The percentage discount value, for example 10.00 for a "10% off" discount.

Constructor Summary

PercentageDiscount(percentage : Number)

Create a percentage-discount on the fly.

Method Summary

getPercentage() : Number

Returns the percentage discount value, for example 10.00 for a "10% off" discount.

Methods inherited from class Discount

getItemPromotionTiers, getPromotion, getPromotionTier, getQuantity, getType

Methods inherited from class Object

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Constructor Detail

PercentageDiscount

publicPercentageDiscount(percentage : Number)

Create a percentage-discount on the fly. Can be used to create a custom price adjustment.

Parameters:

percentage - percentage value, e.g. 15.00 for 15%


Method Detail

getPercentage

getPercentage() : Number

Returns the percentage discount value, for example 10.00 for a "10% off" discount.

Returns:

Discount percentage value