Table of Contents

Class ProductFieldValue

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
This class saves the new values for
[Serializable]
public class ProductFieldValue
Inheritance
ProductFieldValue
Inherited Members

Examples

using Dynamicweb.Ecommerce.Products;

namespace Dynamicweb.Ecommerce.Examples.Products
{
    public class ProductGroupCustomFieldsRendererSample
    {
        public void RenderProductGroupCustomFields(ProductGroupFieldValueCollection productGroupFieldValues)
        {
            var values = new ProductFieldValueCollection();

            foreach (var value in productGroupFieldValues)
            {
                var field = new ProductField();
                var fieldValue = new ProductFieldValue(field, value.Value)
                {
                    ProductField =
                    {
                        Types = value.ProductGroupField.Types,
                        TemplateName = value.ProductGroupField.TemplateName,
                        SystemName = value.ProductGroupField.SystemName
                    },
                    Value = value.Value
                };


                values.Add(fieldValue);
            }

            if (values.Count > 0)
            {
                //TODO: insert your code here
            }
        }
    }
}

Constructors

ProductFieldValue()

Initializes a new instance of the ProductFieldValue class.
public ProductFieldValue()

ProductFieldValue(ProductField, object)

Initializes a new instance of the ProductFieldValue class.
public ProductFieldValue(ProductField productField, object value)

Parameters

productField ProductField
The product field.
value object

ProductFieldValue(string, ProductField, object)

Initializes a new instance of the ProductFieldValue class.
public ProductFieldValue(string languageId, ProductField productField, object value)

Parameters

languageId string
productField ProductField
The product field.
value object

Properties

HasValue

Gets value indicating whether the product field value has been set.
public bool HasValue { get; }

Property Value

bool

LanguageId

Gets the language id.
public string LanguageId { get; }

Property Value

string

ProductField

Gets or sets the product field.
public ProductField ProductField { get; set; }

Property Value

ProductField
The product field.

Value

Gets or sets the value.
public object Value { get; set; }

Property Value

object
The value.

Methods

GetFieldName()

Get product field name
public string GetFieldName()

Returns

string

Save(DataRow)

Saves the specified DataRow.
public void Save(DataRow dataRow)

Parameters

dataRow DataRow
DataRow.
To top