Created
September 7, 2017 22:59
-
-
Save iamkeir/6c52fd21b12a77c40ec5d8814414af8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for block in section.blocks %} | |
<!-- Could also work with collections, blogs, articles... --> | |
{% if product.handle == block.settings.product %} | |
<!-- Could also be a snippet include --> | |
{{ block.settings.product['some_value'] }} | |
{% endif %} | |
{% endfor %} | |
{% schema %} | |
{ | |
"name": "Product data", | |
"blocks": [ | |
{ | |
"type": "product-data", | |
"name": "Product info", | |
"settings": [ | |
{ | |
"id": "product", | |
"type": "product", | |
"label": "Choose product" | |
}, | |
{ | |
"id": "some_value", | |
"type": "text", | |
"label": "Some value" | |
} | |
] | |
} | |
] | |
} | |
{% endschema %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Principally allows 'pseudo-dynamic' section data on each product page (or other dynamic page) in Shopify.