Table of Contents

Class OrderPromotionInfo

Namespace
CMS.Commerce
Assembly
CMS.Commerce.dll

Data container class for OrderPromotionInfo.

[InfoCache(InfoCacheBy.ID)]
public class OrderPromotionInfo : AbstractInfo<OrderPromotionInfo, IInfoProvider<OrderPromotionInfo>>, IExtensible, IInfo, IAdvancedDataContainer, ICMSObject, IHierarchicalDataContainer, IDataContainer, ISimpleDataContainer, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable, IMacroObject, IInfoWithId
Inheritance
object
OrderPromotionInfo
Implements
Inherited Members
Extension Methods

Constructors

OrderPromotionInfo()

Creates an empty instance of the OrderPromotionInfo class.

public OrderPromotionInfo()

OrderPromotionInfo(DataRow)

Creates a new instance of the OrderPromotionInfo class from the given System.Data.DataRow.

public OrderPromotionInfo(DataRow dr)

Parameters

dr DataRow

Data row with the object data

Fields

OBJECT_TYPE

Object type.

public const string OBJECT_TYPE = "commerce.orderpromotion"

Field Value

string

TYPEINFO

Type information.

public static readonly ObjectTypeInfo TYPEINFO

Field Value

ObjectTypeInfo

Properties

OrderPromotionDiscountAmount

Promotion discount amount applied to the order or order item.

[DatabaseField]
public virtual decimal OrderPromotionDiscountAmount { get; set; }

Property Value

decimal

Remarks

The promotion discount amount is stored in the order promotion object at the time the order is created to preserve the discount value, in case the promotion is later deleted or modified. For catalog promotions, this represents the total discount amount for the order item (unit discount × quantity). For order promotions, this represents the discount amount applied to the order, which may be split proportionally across order items.

OrderPromotionID

Promotion ID.

[DatabaseField]
public virtual int OrderPromotionID { get; set; }

Property Value

int

OrderPromotionOrderID

Reference to the order ID from OrderInfo.

[DatabaseField]
public virtual int OrderPromotionOrderID { get; set; }

Property Value

int

OrderPromotionOrderItemID

Reference to the order item ID from OrderItemInfo.

[DatabaseField]
public virtual int OrderPromotionOrderItemID { get; set; }

Property Value

int

OrderPromotionPromotionDisplayName

Promotion display name.

[DatabaseField]
public virtual string OrderPromotionPromotionDisplayName { get; set; }

Property Value

string

Remarks

The promotion display name is stored in the order object to preserve the display name at the time the order is created, in case the promotion is later deleted.

OrderPromotionPromotionID

Reference to the promotion ID from PromotionInfo.

[DatabaseField]
public virtual int OrderPromotionPromotionID { get; set; }

Property Value

int

OrderPromotionPromotionType

Promotion type.

[DatabaseField(ValueType = typeof(string))]
public virtual PromotionType OrderPromotionPromotionType { get; set; }

Property Value

PromotionType

Remarks

The promotion type copied from PromotionType.

Methods

DeleteObject()

Deletes the object using appropriate provider.

protected override void DeleteObject()

SetObject()

Updates the object using appropriate provider.

protected override void SetObject()