Here is a video showing where i need it to be implemented:
https://www.loom.com/share/b69d2d24fc8042e189fc593331 9032ea
Here is a video showing where i need it to be implemented:
https://www.loom.com/share/b69d2d24fc8042e189fc593331 9032ea
What would you like to add to collapsible tab?
i would like to add a custom liquid block inside the collapsible tab.
Oh my bad. Youâll need to make some changes to your main-product.liquid.
Add this to the last setting in your collapsible row settings in your schema.
,{
"type": "liquid",
"id": "custom_liquid",
"label": "t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.label",
"info": "t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.info"
}
And in your collapsible row block should have this added to it.
{%- when 'collapsible_tab' -%}
// Code for custom liquid here
{{ block.settings.custom_liquid }}
So im using the empire theme v7 & it does not have the main-product.liquid file.
Search for Product in the code editor. Screenshot the options it gives here, so we can figure out what file has the main-product.
So ive added this code to the static-product.liquid file, line 193-197
,{ âtypeâ: âliquidâ, âidâ: âcustom_liquidâ, âlabelâ: ât:sections.main-product.blocks.custom_liquid.settings.custom_liquid.labelâ, âinfoâ: ât:sections.main-product.blocks.custom_liquid.settings.custom_liquid.infoâ }
But the 2nd code right below the .
And also in schema change the label to âlabelâ:âCustom Liquidâ and delete the info below it.
Ive slightly changed the 1st code from:
,{
âtypeâ: âliquidâ,
âidâ: âcustom_liquidâ,
âlabelâ: ât:sections.main-product.blocks.custom_liquid.settings.custom_liquid.labelâ,
âinfoâ: ât:sections.main-product.blocks.custom_liquid.settings.custom_liquid.infoâ
}
to
,{
âtypeâ: âliquidâ,
âidâ: âcustom_liquidâ,
âlabelâ: ât:sections.product.blocks.custom_liquid.custom_liquid.labelâ,
âinfoâ: ât:sections.product.blocks.custom_liquid.custom_liquid.infoâ
}
This has removed the error message that was shown within the theme editor as shown below
In the schema change the label to âlabelâ:âCustom Liquidâ and delete the info below it.
Okay. If itâs works then thatâs all that matters.
when i put the 2nd code below the it provides an error message.
So i tried to remove the
{%- when âcollapsible_tabâ -%}
then i was able to save it but when i try to add code to the custom liquid, nothing it output.
Also im quite confused about the schema thing you mentioned, could you elaborate, not sure where to find it.
delete this code
<div class="product__accordion accordion quick-add-hidden> and everything in it, but leave the . And right before the put {{ block.settings.custom_liquid }}
And also kindly show the liquid code youâre trying to put in