Click or drag to resize
Discount Class
Facade class for MultiBuyDiscountInfo and DiscountInfo
Inheritance Hierarchy
SystemObject
  CMS.EcommerceDiscount

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax
C#
public sealed class Discount

The Discount type exposes the following members.

Constructors
  NameDescription
Public methodDiscount
Initializes a new instance of the facade class.
Top
Properties
  NameDescription
Public propertyCouponCodes
Returns coupon codes associated with this discount.
Public propertyDiscountApplyFurtherDiscounts
Indicates that further discounts (in order of DiscountOrder) are to be processed.
Public propertyDiscountCustomerRestriction
Type of discount customer restriction.
Public propertyDiscountDescription
Discount description.
Public propertyDiscountDisplayName
Discount display name.
Public propertyDiscountEnabled
Discount enabled.
Public propertyDiscountGUID
Discount GUID.
Public propertyDiscountID
Discount ID.
Public propertyDiscountIsFlat
True - discount value is flat, False - discount value is relative. Used for discount calculation in the shopping cart.
Public propertyDiscountLastModified
Discount last modified date and time.
Public propertyDiscountName
Discount name.
Public propertyDiscountOrder
Order of this discount among other discounts.
Public propertyDiscountRoles
Discount roles to apply discount for. Is dependable on DiscountCustomerRestriction configuration.
Public propertyDiscountSiteID
Discount site ID.
Public propertyDiscountStatus
Discount status.
Public propertyDiscountType
Gets the type of the discount.
Public propertyDiscountUsesCoupons
Indicates if this discount is applicable only with discount coupon.
Public propertyDiscountValidFrom
Discount valid from.
Public propertyDiscountValidTo
Discount valid to.
Public propertyDiscountValue
Discount value.
Public propertyHasOrUsesCoupon
Indicates if discount uses coupon or has some coupons defined.
Public propertyIsRunning
Determines whether discount is currently running. ValidFrom and ValidTo properties are compared to current date/time.
Public propertyIsValid
Determines whether discount is valid. Discount must be currently running and have usable coupon codes if discount uses coupons.
Top
Methods
  NameDescription
Public methodAcceptsCoupon
Indicates if given coupon code is suitable for this discount. Returns false if this discount has no codes assigned.
Public methodCreateCoupon
Creates and saves new coupon for this discount. NOTE: The uniqueness is not checked.
Top
Operators
See Also