Dear community,
I am quite new here and I hope you could assist me with the following. I would like to have a product-specific description shown in different tabs on the product page. I understand that this topic has been discussed several times, I could not find anything suitable for my case, though. Since I use the “Showcase” theme, the tabs feature is already given. However, those have to be linked to a specific page. My idea is to establish a link to a section, which pulls the information from product meta data. So far, my achievements based on the Bonify app are:
Section template:
{% render "blocks.custom_fields" with resource_type: "products", blocks: section.blocks %}
{% schema %}
{
"name": {
"en": "Custom Fields"
},
"settings": [
{
"type": "paragraph",
"content": "[View Documentation](https:\/\/custom-fields.docs.bonify.io\/)"
},
{
"type": "paragraph",
"content": "[Edit Custom Fields](https:\/\/customfields.bonify.io\/dashboard\/obrucci.myshopify.com\/products\/configure)"
}
],
"blocks": [
{
"type": "cf_f_fcj",
"name": {
"en": "Field Collection"
},
"settings": [
{
"type": "select",
"id": "key",
"label": "Select a Repeater Field",
"options": [
{
"value": "material",
"label": "Material"
}
]
}
]
}
]
}
{% endschema %}
Rendering:
{% if resource_type == "products" %}
{% for block in blocks %}
{% if block.type contains "cf_" %}
{% case block.settings.key %}
{% when "material" %}
{% render "custom_fields.products.material" %}
{% endcase %}
{% endif %}
{% endfor %}
{% endif %}
Pulling the meta data:
{% if product.metafields.custom_fields["material"] != blank %}
{% for item in product.metafields.custom_fields["material"] %}
{{ item["material"] }}
{% endfor %}
{% endif %}
Now, I wonder how can I assign the section above instead of a page to the variable “tab3_content”. The code below is the implementation of the Showcase scheme.
assign tab3_title = pages[section.settings.tab_3_page].title
assign tab3_content = pages[section.settings.tab_3_page].content
I am not sure, whether I am doing it completely incorrectly. Please let me know.
Thank you in advance,
Alex