Class MatrixCellConversionService
- Namespace
- Dynamicweb.Ecommerce.Products.FieldValueConversions
- Assembly
- Dynamicweb.Ecommerce.dll
Resolves the display value of a matrix cell for a column that has a field value conversion.
Matrix cell values are stored in the conversion group's base unit; when a conversion rule selects
a (possibly non-base) presentation unit, the value is converted to that unit (e.g. a value stored
as "20" in grams becomes "0.02 kg"), otherwise it is shown in the base unit. Shared by the storefront
view model (MatrixViewModelFactory) and the admin overview (ProductFieldValueDisplayService)
so both render cells identically.
public class MatrixCellConversionService
- Inheritance
-
MatrixCellConversionService
- Inherited Members
Methods
GetCellDisplayValue(Field, string, string)
Returns the display value of a matrix cell for the given column. When a conversion rule selects a
presentation unit, the stored (base-unit) value is converted to that unit and the
unit name appended (e.g. "20" stored in grams becomes "0.02 kg"); otherwise the value is shown in the
column's base unit. Returns value unchanged when no conversion applies, or it is empty.
public virtual string GetCellDisplayValue(Field column, string value, string languageId)