How can one get variant metafields show up in the collapsible tabs?

Trying to have the content that shows up in the collapsible tab switch by variant. Example, my fabric content changes with each variant and I’d like that to switch.

Any help much appreciated as it wouldn’t let me pull it in by variant, only by product. Is there a way to do that with some custom liquid?

Sadly, it’s not possible to render the data dynamically with Liquid. You may want to add some JavaScript on top of that Liquid code and it should do the thing. Here is the link to a similar thread.

Once you get the variant data displayed, you can create a custom accordion to wrap that code.

Thank you. Was able to achieve with JS.

1 Like