Added this to the ProductFieldViewModelBuilder
if (fieldDefinition.FieldType == SystemFieldTypeConstants.Boolean)
{
var booleanFieldFormatArgs = new FieldFormatArgs { Culture = cultureInfo };
return new ProductFieldViewModel
{
ViewName = “BooleanField”,
Name = fieldDefinition.Localizations[cultureInfo].Name,
Value = fieldFormatter.Format(fieldDefinition, value, booleanFieldFormatArgs),
Args = booleanFieldFormatArgs
};
}
and created a view to handle boolean fields (_BooleanField.cshtml)
@model Litium.Accelerator.ViewModels.ProductFieldViewModel
@if (!string.IsNullOrEmpty(Model.Value))
{
@Model.Name
<br />
if (bool.Parse(Model.Value))
{
@Html.WebSiteString("product.true.value")
}
if (!bool.Parse(Model.Value))
{
@Html.WebSiteString("product.false.value")
}
}