Table of Contents

Class CalculationProvider

Namespace
Dynamicweb.Ecommerce.Products.FieldTypeProviders
Assembly
Dynamicweb.Ecommerce.dll
[AddInName("Dynamicweb.Ecommerce.FieldTypeProviders.CalculationProvider")]
[AddInLabel("Calculation FieldType Provider")]
[AddInActive(true)]
[Serializable]
public sealed class CalculationProvider : ProductFieldTypeProvider, IParameterOptions
Inheritance
CalculationProvider
Implements
Inherited Members

Properties

DecimalPlaces

[AddInParameter("Decimal places")]
[AddInParameterEditor(typeof(IntegerNumberParameterEditor), "")]
[AddInParameterGroup("Source")]
public int DecimalPlaces { get; set; }

Property Value

int

ErrorMessage

public string ErrorMessage { get; }

Property Value

string

Expression

[AddInParameter("Expression")]
[AddInParameterEditor(typeof(LanguageExpressionParameterEditor), "info=Use {FieldSystemName1} to define placeholders. Use [{FieldSystemName1} * 2 + {FieldSystemName2}] syntax to define calculated placeholders. Example: The '{ProductName}' price with discount is [{ProductPrice} * 0.8]")]
public string Expression { get; set; }

Property Value

string

FieldOptionSource

[AddInParameter("FieldOptionSource")]
[AddInLabel("Use Listbox content")]
[AddInParameterEditor(typeof(RadioParameterEditor), "")]
public string FieldOptionSource { get; set; }

Property Value

string

Methods

GetAppenderInfo(string, Dictionary<string, string>)

public override string GetAppenderInfo(string languageId, Dictionary<string, string> settings)

Parameters

languageId string
settings Dictionary<string, string>

Returns

string

GetAppenderInfo(string, string)

public override string GetAppenderInfo(string languageId, string settings)

Parameters

languageId string
settings string

Returns

string

GetExpression(string)

public string GetExpression(string language)

Parameters

language string

Returns

string

GetParameterOptions(string)

public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)

Parameters

parameterName string

Returns

IEnumerable<ParameterOption>

GetProductValue(Product, object, string, Dictionary<string, string>)

public override object GetProductValue(Product product, object fieldValue, string languageId, Dictionary<string, string> settings)

Parameters

product Product
fieldValue object
languageId string
settings Dictionary<string, string>

Returns

object

GetValue(object, string, Dictionary<string, string>)

public override object GetValue(object value, string languageId, Dictionary<string, string> settings)

Parameters

value object
languageId string
settings Dictionary<string, string>

Returns

object

IsCalculated(Dictionary<string, string>)

public override bool IsCalculated(Dictionary<string, string> settings)

Parameters

settings Dictionary<string, string>

Returns

bool

RenderAdditionalContent(TextWriter)

Renders the content of the additional.

public override void RenderAdditionalContent(TextWriter output)

Parameters

output TextWriter

The output.

To top