Developer forum

Forum » Ecommerce - Standard features » Display boolean fields of a Field display group

Display boolean fields of a Field display group

Tomas Gomez
Reply

Hi,

When using Field display groups, the boolean fields set as FALSE are not displayed at the frontend.

In particular, these fields are displayed by the template Swift_ProductSpecification.cshtml. Inspecting the template, the boolean fields set as FALSE are not listed as group fields, so they are not even considered to be displayed.

Is there any setting to display the FALSE boolean fields of a Field display group?

Regards,
Tomas

 


Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Tomas

Yes, the Specification template is a little messy and it can be tough to know what really happens. In line 454 we actually translates booleans to "Yes" and "No" - Can you telle me a little more about where you thing we filter them off in the template?


Best regards
Karsten Thuen

 
Tomas Gomez
Reply

Hi Karssten,

The problem is that the boolean fields marked as FALSE are not included in the group fields at line 104. That is, the boolean fields marked as TRUE are included (so they can be processed) but the fields marked as FALSE are not included (so they cannot be processed afterwards).

How can I force them to be included?

Regards,
Tomas

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Tomas

The boolean fields are not hidden around line 104, as far I can see. And I still have not been able to find the exact place in the template where it happens. I have asked our backenders to look into if they have something in the code that hides boolean fields set to false.

 

Best regards
Karsten Thuen

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

If you want to do a test on the raw data from the backend, you can replace line 22 - 537 with this:

@foreach (CategoryFieldViewModel group in product.FieldDisplayGroups.Values)
{
foreach (var field in group.Fields) { 
<div>@field.Key @field.Value</div>
}
}

Seems like a bug from the backend. We will have to see what they find.

 
Best regards
Karsten Thuen
 
Tomas Gomez
Reply

Hi Karsten,

I tried your code with the same result: The boolean field is only displayed when it is marked as true. It is not displayed when marked as false. I may send you a video proof to your mail if you want.

Please tell me what your backenders discover about it.

Regards,
Tomas

 
Tomas Gomez
Reply

Hi Karsten,

Any news about this issue?

Regards,
Tomas

 
Tomas Gomez
Reply

Bump!

Does the backend people found the issue?

Regards,
Tomas

 

You must be logged in to post in the forum