A space to discuss online store customization, theme development, and Liquid templating.
Hey, I'm trying to create a image picker inside the main-product section on a Dawn template.
I'm using these codes:
In the {% schema %} section, I'm using this one:
{
"type": "image_picker",
"name": "metodo pagos",
"limit": 1,
"settings": [
{
"type": "image_picker",
"id": "upload_image",
"label": "Upload a image",
"info": "aquí va la imagen"
}
]
},
and this one:
{%- when 'image_picker' -%}
<div class="image__picker" {{ block.shopify_attributes }}>
<img src="{{ section.settings.upload_image | img_url: '100x'}}" style="width:100%; height:auto; display:block; border:1px solid #ddd;" class="img-responsive"/>
</div>
When customizing my theme, it shows the block correctly and allows me to choose the image, but it keeps showing the "no image" message
Solved! Go to the solution
This is an accepted solution.
Hello @asahic ,
Please use block.settings.upload_image instead of section.settings.upload_image.
Hope this helps you,
Regards
Morgan
This is an accepted solution.
Hello @asahic ,
Please use block.settings.upload_image instead of section.settings.upload_image.
Hope this helps you,
Regards
Morgan
Thanks!!! This solved my problem!