Class ProductFieldValue
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
This class saves the new values for Product
- Inheritance
-
Product
Field Value
- 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 Product
ProductFieldValue(ProductField, object)
Initializes a new instance of the Product
Parameters
productField
ProductField The product field.
value
objectThe value.
ProductFieldValue(string, ProductField, object)
Initializes a new instance of the Product
Parameters
languageId
stringLanguage ID.
productField
ProductField The product field.
value
objectThe value.
Properties
HasValue
Gets value indicating whether the product field value has been set.
Property Value
LanguageId
Gets the language id.
Property Value
ProductField
Gets or sets the product field.
Property Value
- Product
Field The product field.
Value
Gets or sets the value.
Property Value
- object
The value.
Methods
GetFieldName()
Get product field name
Returns
Save(DataRow)
Saves the specified DataRow.
Parameters
dataRow
DataRow DataRow.