Posted on 24/10/2016 13:26:55
Hi Aki,
yes, you could use the Dynamicweb.eCommerce.Products.ProductField class for that.
Here is a sample code for creating a new field:
var productField = new ProductField();
productField.Name = "SomeFieldName";
productField.SystemName = "SomeFieldSystemName"; //must be unique for different fields
productField.TemplateName = "TemplateName";
//look into the table [EcomFieldType] for the available [FieldTypeID] values
productField.TypeID = 1;//1 is Text (255)
//save new field to database
productField.Save("0");
Regards, Dmitrij