Table of Contents

Class CheapProductsDiscountExtender

Namespace
Dynamicweb.Ecommerce.Examples.Orders.Discounts
Assembly
Dynamicweb.Ecommerce.Examples.dll
The example of an extender for product discounts - if applied the discount will be valid for products with a price less than specified
public class CheapProductsDiscountExtender : DiscountExtenderBase
Inheritance
CheapProductsDiscountExtender
Inherited Members

Constructors

CheapProductsDiscountExtender()

Constructor - sets the maximum price to 100
public CheapProductsDiscountExtender()

Properties

CheapPrice

[AddInParameter("Cheap price")]
[AddInDescription("Specify max price a product should have to get the discount")]
[AddInParameterEditor(typeof(IntegerNumberParameterEditor), "minValue=0;maxValue=1000;allowNegativeValues=false;localizeValues=true;")]
public int CheapPrice { get; set; }

Property Value

int

Methods

DiscountValidForProduct(Product)

If this extender is used for a product discount, it will be checked here
public override bool DiscountValidForProduct(Product product)

Parameters

product Product

Returns

bool
To top