SaaS CMS has officially launched! Learn more now.

Class PurchaseQuantity

A condition for PromotionDatas where the user needs to specify a RequiredQuantity for Items.

Inheritance
System.Object
PurchaseQuantity
Namespace: EPiServer.Commerce.Marketing.Promotions
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public class PurchaseQuantity : ConditionBlock

Constructors

PurchaseQuantity()

Declaration
public PurchaseQuantity()

Properties

Items

The target items for which the promotion is valid.

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

MatchRecursive

Determines if a recursive logic should be used when identifying if an item is valid according to the conditions of the promotion.

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

RequiredQuantity

The promotion will apply if the number of cart items that Items match are equal or higher than this value.

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

Methods

SetDefaultValues(ContentType)

Sets the default values for this instance, which will include setting PartiallyFulfilledThreshold to one and MatchRecursive to true.

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

The content type for this instance.

Extension Methods