Boolean value logic Litium 4.6 vs 7.2

Hi! We recently made a new site for a client where they went from v. 4.6 to 7.2.
It was recently discovered that on the old site they were using the “undefined” alternative to hide properties on a product from showing up in their product specification. But it seems in v 7.2 you can’t set a boolean to undefined anymore. Or “unset” the value in any way. Is there somehow you can extend Litiums Boolean field to add add an option for “undefined” and set value to Null in database?

Litium version: 7.2

You can find an example of a tristate checkbox (boolean) custom field here, developed by @ton.nguyen :

Simplest solution is to instead use a TextOptionField with 3 options. This way you also dont have to make custom code to handle displayed value on productpage tabs and productfilter.

If using a boolean field results in product information and product filter to display true false as value for the property unless to add custom code to translate them.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.