Table of Contents

Class FavoriteNameDiscountExtender

Namespace
Dynamicweb.Ecommerce.Examples.Orders.Discounts
Assembly
Dynamicweb.Ecommerce.Examples.dll
The example of an extender for order discounts
public class FavoriteNameDiscountExtender : DiscountExtenderBase
Inheritance
FavoriteNameDiscountExtender
Inherited Members

Constructors

FavoriteNameDiscountExtender()

Constructor - sets the favorite name to Marta
public FavoriteNameDiscountExtender()

Properties

FavoriteName

[AddInParameter("Favorite name")]
[AddInDescription("Specify what a customer name should start with to get this discount")]
[AddInParameterEditor(typeof(TextParameterEditor), "")]
public string FavoriteName { get; set; }

Property Value

string

Methods

DiscountValidForOrder(Order)

If this extender is used for an order discount, it will be checked here Checks if the name on the order starts with the specified name and returns true to apply the discount
public override bool DiscountValidForOrder(Order order)

Parameters

order Order

Returns

bool
To top