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: 8.2.23
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
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
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
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
See Also