Try our conversational search powered by Generative AI!

Class PromotionData

Represents a content based promotion item.

Inheritance
System.Object
PromotionData
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
[CLSCompliant(false)]
public abstract class PromotionData : BasicContent
Examples
/// <summary>
/// Sample promotion that gives a percentage discount if a customer buys more than a given number of items from a selection of products.
/// </summary>
[ContentType]
public class PercentagePromotionSample : EntryPromotion
{
/// <summary>
/// Gets or sets the conditions that defines when the promotion is fulfilled or not.
/// </summary>
[PromotionRegion(PromotionRegionName.Condition)]
public virtual PurchaseQuantity Condition { get; set; }

/// <summary>
/// Gets or sets the percentage of discount applied when the promotion is fulfilled.
/// </summary>
[PromotionRegion(PromotionRegionName.Reward)]
public virtual int PercentageDiscount { get; set; }
}

Constructors

PromotionData()

Declaration
protected PromotionData()

Properties

Banner

Gets or sets the banner image of the promotion.

Declaration
public virtual ContentReference Banner { get; set; }
Property Value
Type Description
EPiServer.Core.ContentReference

Coupon

Gets or sets coupon information.

Declaration
public virtual CouponData Coupon { get; set; }
Property Value
Type Description
CouponData

Description

Gets or sets the description of the promotion.

Declaration
public virtual string Description { get; set; }
Property Value
Type Description
System.String

DiscountType

Gets whether the promotion is for an order or individual line items or a shipment.

Declaration
public abstract DiscountType DiscountType { get; }
Property Value
Type Description
DiscountType

ExcludedItems

Gets or sets the list of excluded items. Excluded items won't be combined with this promotion.

Declaration
[DistinctList]
public virtual IList<ContentReference> ExcludedItems { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<EPiServer.Core.ContentReference>

IsActive

Gets or sets the status of the promotion.

Declaration
public virtual bool IsActive { get; set; }
Property Value
Type Description
System.Boolean

Priority

Gets or sets the priority of promotion. The lower value, the higher priority.

Declaration
public virtual int Priority { get; set; }
Property Value
Type Description
System.Int32

RedemptionLimits

Gets or sets redemption limits.

Declaration
public virtual RedemptionLimitsData RedemptionLimits { get; set; }
Property Value
Type Description
RedemptionLimitsData

Schedule

Gets or sets the promotion schedule.

Declaration
public virtual PromotionSchedule Schedule { get; set; }
Property Value
Type Description
PromotionSchedule

Methods

SetDefaultValues(ContentType)

Declaration
public override void SetDefaultValues(ContentType contentType)
Parameters
Type Name Description
EPiServer.DataAbstraction.ContentType contentType

Extension Methods