For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi everyone,
I have an embedded app block that I would like to have input options for the store owner to set. How would I - for example - add a drop down menu in the area [below extension-test] you see in the attached image?
Some research I've done is look at the settings attribute for the schema but this does not seem to have any effect.
{% schema %}
{
"name": "App Embed",
"target": "head",
"enabled_on": {
"templates": ["product"]
},
"javascript": "app.js",
"settings": [
{
"type": "select",
"id": "my_option",
"label": "Sample Option",
"options": [
{
"value": 2,
"label": "2"
},
{
"value": 3,
"label": "3"
}
]
}
],
"default": 2
}
{% endschema %}
Thank you!
Hi Didierdonne,
This schema looks to be set up correctly - are other settings not appearing if you test, or just `select`?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam,
This is the only setting I have on the extension. Could there be a caching issue perhaps? The reason why I ask is, the name "Star Rating" isn't declared anywhere in any of the files. Perhaps I'm missing something that needs to be cleared/refreshed?
Thanks!
It looks to be working now. I re-installed on the dev store. I also noticed the "default" was outside of the settings array and changed all values to strings.
Great to hear it's working as expected now!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog