Class Discount
- Namespace
- Dynamicweb.Ecommerce.Orders.Discounts
- Assembly
- Dynamicweb.Ecommerce.dll
Represents information about a discount.
- Inheritance
-
Discount
- Inherited Members
Constructors
Discount()
Initializes a new instance of the Discount class.
Properties
Active
Gets or sets the value indicating whether instance is active.
Property Value
Actual
Gets a value indicating whether this order time lays within "valid from - valid to" interval.
Property Value
AddFreeShipping
Property Value
Amount
Gets or sets the fixed discount amount of the instance.
Property Value
AmountIncludesVat
Property Value
AmountProductFieldName
Gets or sets the name of amount product field of the discount.
Property Value
AnonymousUsers
Property Value
AssignableFromProducts
Gets or sets the value indicating whether instance is assignable from products and groups.
Property Value
CampaignColor
Property Value
CampaignImage
Property Value
CampaignName
Gets or sets the default campaign name
Property Value
CheckForValidationReason
Gets the value which indicates that validation reason should be checked
Property Value
Country
Gets or sets the country of the discount.
Property Value
CountryCode2
Gets or sets the country code of the country the discount is valid for Null is all countries.
Property Value
CreatedBy
Property Value
CreatedDate
Property Value
Currency
Gets or sets the currency of the discount.
Property Value
Exceptions
- Exception
Thrown when DiscountType property is DiscountTypes.Percentage and the value is not set to null.
CurrencyCode
Gets or sets the currency code of the currency the fixed discount amount / loyalty point rate.
Property Value
Description
Gets or sets the default description of the instance.
Property Value
DiscountApplyToProduct
Gets or sets the DiscountApplyToProduct of the instance.
Property Value
DiscountApplyType
Gets or sets the Discount
Property Value
DiscountType
Gets or sets the DiscountType of the instance.
Property Value
ExcludedProductsAndGroupsIds
Property Value
Extender
Gets a reference To the extender instance
Property Value
ExtenderSettings
Gets or sets the extender parameters.
Property Value
ExtenderType
Gets Or sets the name of the extender type.
Property Value
ExternalId
Gets or sets the external id
Property Value
HasProductRestrictions
Property Value
ID
Property Value
IsApplyDiscountOnce
Property Value
IsNew
Property Value
Language
Gets or sets the language of the discount.
Property Value
LanguageId
Gets or sets the ID of the language the discount is valid for Null is all languages.
Property Value
LoyaltyPointsRate
Property Value
MaximumLimits
Property Value
Name
Gets or sets the default name of the instance.
Property Value
OnlyApplyToNonDiscountedItems
Property Value
OrderContextId
Gets or sets the order context id of the discount.
Property Value
OrderFieldName
Gets or sets the name of order field of the discount.
Property Value
OrderFieldValue
Gets or sets the required value of the order field specified in the OrderFieldName property.
Property Value
OrderTotalPrice
Gets or sets the order total price condition. Default value is 0.00
Property Value
OrderTotalPriceCondition
Gets or sets the conditional operator for comparing the order total price.
Property Value
OrderTotalPriceCurrencyCode
Gets or sets the order total price condition currency
Property Value
Payment
Gets or sets the payment of the discount.
Property Value
PaymentId
Gets or sets the Id of the payment the discount is valid for Null is all payments.
Property Value
Percentage
Gets or sets the discount percentage of the instance.
Property Value
Priority
Property Value
ProductAsDiscount
Gets or sets the product and/or product variant that acts as a discount.
Property Value
ProductIdByDiscount
Gets or sets the ID of the product that acts as a discount.
Property Value
ProductQuantification
Gets or sets the product quantification the discount uses when validating product quantities.
Property Value
ProductQuantity
Gets or sets the product quantity required for the discount to be valid.
Property Value
ProductVariantIdByDiscount
Gets or sets the ID of the product variant of the product that acts as a discount.
Property Value
ProductsAndGroupsIds
Property Value
Shipping
Gets or sets the shipping of the discount.
Property Value
ShippingAmount
Gets or sets the amount if the discount is a shipping discount.
Property Value
- double
The shipping amount.
ShippingCurrency
Gets or sets the currency code of the shpping amount if the discount is a shipping discount.
Property Value
- string
The shipping currency.
ShippingId
Gets or set the ID of the shipping the discount is valid for Null is all shipping.
Property Value
Shop
Gets or sets the shop of the discount.
Property Value
ShopId
Gets or sets the ID of the shop the discount is valid for Null is all shops.
Property Value
StopFurtherProcessing
Property Value
Translations
Gets the translations.
Property Value
UpdatedBy
Property Value
UpdatedDate
Property Value
UsePerCustomer
Property Value
User
Gets or sets the user of the discount.
Property Value
UserCustomerNumber
Gets or sets the customer number the discount is valid for Null is all customer numbers.
Property Value
UserGroup
Gets or sets the user group of the discount.
Property Value
UserGroupId
Gets or sets the Id of the user group the discount is valid for Null is all user groups.
Property Value
- int?
UserId
Gets or sets the ID of the user the discount is valid for Null is all users.
Property Value
- int?
ValidFrom
Gets or sets the date and time from when the instance is valid.
Property Value
ValidTo
Gets or sets the data and time to which the instance is valid.
Property Value
VoucherListId
Gets or sets the ID of the voucher list to use when OrderFieldName is “OrderVoucherCode”.
Property Value
- int?
Exceptions
- Exception
Trown when Order
Field property is not set to “OrderVoucherCode” and value is not set to null.Name
Methods
GetCampaignName(string)
Gets the translated campaign name in specified language
Parameters
languageId
string
Returns
GetDescription(string)
Gets the translated description in specified language
Parameters
languageId
string
Returns
GetName(string)
Gets the translated name in specified language
Parameters
languageId
string
Returns
GetVoucherList()
Gets the voucher list of the discount.
Returns
SetCampaignName(string, string)
Sets the translated campaign name in specified language
Parameters
SetDescription(string, string)
Sets the translated description in specified language
Parameters
SetName(string, string)
Sets the translated name in specified language
Parameters
SetVoucherList(VoucherList)
Set the voucher list of the discount.
Parameters
voucherList
VoucherList
Exceptions
- Exception
Thrown when the OrderFieldName property is not set to “OrderVoucherCode” and the value of this property is not set to null.