Discount Class |
Namespace: CMS.Ecommerce
public sealed class Discount
The Discount type exposes the following members.
Name | Description | |
---|---|---|
AcceptsCoupon |
Indicates if given coupon code is suitable for this discount. Returns false if this discount has no codes assigned.
| |
CreateCoupon |
Creates and saves new coupon for this discount.
NOTE: The uniqueness is not checked.
|
Name | Description | |
---|---|---|
(Discount to MultiBuyDiscountInfo) |
Implicit conversion
| |
(Discount to DiscountInfo) |
Implicit conversion
| |
(DiscountInfo to Discount) |
Implicit conversion
| |
(MultiBuyDiscountInfo to Discount) |
Implicit conversion
|
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
Name | Description | |
---|---|---|
CouponCodes |
Returns coupon codes associated with this discount.
| |
DiscountApplyFurtherDiscounts |
Indicates that further discounts (in order of DiscountOrder) are to be processed.
| |
DiscountCustomerRestriction |
Type of discount customer restriction.
| |
DiscountDescription |
Discount description.
| |
DiscountDisplayName |
Discount display name.
| |
DiscountEnabled |
Discount enabled.
| |
DiscountGUID |
Discount GUID.
| |
DiscountID |
Discount ID.
| |
DiscountIsFlat |
True - discount value is flat, False - discount value is relative. Used for discount calculation in the shopping cart.
| |
DiscountLastModified |
Discount last modified date and time.
| |
DiscountName |
Discount name.
| |
DiscountOrder |
Order of this discount among other discounts.
| |
DiscountRoles |
Discount roles to apply discount for. Is dependable on DiscountCustomerRestriction configuration.
| |
DiscountSiteID |
Discount site ID.
| |
DiscountStatus |
Discount status.
| |
DiscountType |
Gets the type of the discount.
| |
DiscountUsesCoupons |
Indicates if this discount is applicable only with discount coupon.
| |
DiscountValidFrom |
Discount valid from.
| |
DiscountValidTo |
Discount valid to.
| |
DiscountValue |
Discount value.
| |
HasOrUsesCoupon |
Indicates if discount uses coupon or has some coupons defined.
| |
IsRunning |
Determines whether discount is currently running. ValidFrom and ValidTo properties are compared to current date/time.
| |
IsValid |
Determines whether discount is valid. Discount must be currently running and have usable coupon codes if discount uses coupons.
|