private void CreateDynamicItemField(TemplateBuilder builder, ProductDefinitionField definitionField, int sortOrder, ID parentId) { ID id = definitionField.SitecoreTemplateFieldForVariant(parentId); TemplateFieldHelper.CreateField(builder, definitionField, sortOrder, id); _productDefinitionFieldIdToFieldIdMap[definitionField.ProductDefinitionFieldId] = id; }
public void AddDynamicFieldValuesForProduct(Product product, FieldList list, VersionUri version) { var properties = product.GetProperties().ToList(); properties.Where(x => x.RenderForCulture(version.Language.CultureInfo.ToString())) .ToList() .ForEach(x => TemplateFieldHelper.AddDynamicFieldValuesForProduct(list, x, _productDefinitionFieldIdToFieldIdMap)); }