Liquid, JavaScript, themes, sales channels
Hey All.
My store URL is https://caresmith-india-cd1f.myshopify.com/ I am using Ella theme for shopify and somehow all my metafields are displaying in what I believe is JSON format instead of how they should be displayed.
They are rich text metafields and this is the output they are giving on the front end.
{"type":"root","children":[{"listType":"unordered","type":"list","children":[{"type":"list-item","children":[{"type":"text","value":"Item 1"}]},{"type":"list-item","children":[{"type":"text","value":"Item 2"}]},{"type":"list-item","children":[{"type":"text","value":"Item 3"}]}]}]}
On the product page in the metafield editor it shows perfectly fine as
but on the product page on the front end it shows that unformatted metafield code
Would appreciate any help
Add .value at the end of your metafield variable. Let us know if that does it!
At the end of the variable name? or in the product-tab.liquid where the metafield is referenced?
Here's the liquid for the metafield tab
{%- liquid
assign title = block.settings.title
assign has_tab = false
assign source = block.settings.product_custom_source
assign key = block.settings.product_tab_key_metafield
if source == 'dynamic'
assign meta_ref = key
else
assign meta_ref = product.metafields.c_f[key]
endif
if block.type == 'custom'
if block.settings.type == 'metafield'
if meta_ref
assign has_tab = true
assign content = meta_ref
else
assign has_tab = false
endif
else
assign has_tab = true
assign content = block.settings.content
endif
else
assign has_tab = true
if block.type == 'description'
assign content = product.description
else block.type == 'review'
assign content = product.metafields.spr.reviews
endif
endif
if block.type == 'description' or block.type == 'review' or block.type == 'custom'
assign style_mobile = false
if block.settings.open_tab_mobile
assign style_mobile = 'show-mobile'
endif
if tab_layout_mobile == 'popup'
assign style_mobile = 'popup-mobile'
endif
endif
-%}
Still looking for a solution for this. Would appreciate any help
Bumping for visibility
Did you ever solve this issue? I am facing the same problem.
Hi @Hunter11
Please Share your store url, and meta fields data
User | RANK |
---|---|
35 | |
24 | |
13 | |
13 | |
9 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023