Hi we have product templates with multiple sections but only some are visible on each PDP and we use a metafield to toggle visibility.
I am in the process of moving all of our metafields over to defined metafields and using the customiser to apply the values to the sections, I didn’t want to manually add metafield code into the section code anymore but I can’t apply a boolean metafield to a checkbox setting, is there any way around this?
Thanks
One option is to use a third-party app or custom code to create a custom checkbox field that can be linked to a boolean metafield. This would require some development work, but it would allow you to easily toggle the visibility of sections based on the value of the metafield.
Another option is to use a different type of metafield that can be linked to a checkbox setting. For example, you could use a string metafield with values of “true” or “false” to control the visibility of sections. Then, in the section code, you can use Liquid logic to check the value of the metafield and display the section accordingly.