Discounts
In the Ecommerce module, you can specify the following types of discounts:
- For all customers
- For new customers
- For existing customers
- For specific users or roles
- With a coupon code
The discounts are represented by the Telerik.Sitefinity.Ecommerce.Orders.Model.Discount class. The class exposes the following specific properties:
- ApplyFor
Gets or sets the ApplyDiscountFor value for the discount. The enumeration has the following values:
- AllCustomers
Discount is applicable to all the customers.
- ExistingCustomers
Discount is applicable to existing customers only.
- NewCustomers
Discount is applicable to new customers only.
- WithCouponCode
Discount is applicable only when a coupon code is entered.
- SelectUsersAndRolesitionalCriteria
Discount is applicable to selected users and/or roles only.
- DiscountType
Gets or sets the type of the discount. The enumeration has the following values:
- Sitewide
Discount is applicable to the shopping cart subtotal.
- Coupon
Discount is applied when the customer enters a coupon code.
- IsCouponCodeRequired
Specifies whether a coupon code is required.
- DiscountAmount
Gets or sets the amount of the discount.
- DiscountAmountType
Gets or sets the type of the amount of the discount. The enumeration has the following values:
- Percent
Discount is applied as a percentage of the shopping cart subtotal.
- FixedAmount
Discount is applied as a fixed amount of the shopping cart subtotal.
- DiscountUsed
Gets or sets how many times the discount has been used.
- EndDate
Gets or sets the end date of the discount. After the specified date the discount cannot be used. If you don’t want to specify an end date, set this property to null.
- IsActvie
Specifies whether the discount is active. Discounts that are not active cannot be used.
- MaximumSubtotal
Gets or sets the maximum amount of the subtotal that the discount is applicable to.
- MinimumSubtotal
Gets or sets the minimum amount of the subtotal that the discount is applicable to.
- StartDate
Gets or sets the start date of the discount, when it becomes available.
- Title
Gets or sets the title of the discount.
- Usage
Gets or sets how many times the discount can be used. To specify an unlimited amount of use, set the property to –1.