So I’m trying to add multiple USP rows to the product-meta on the product-page.
Currently I have this code in my schema to allow an image and USP text:
"name": "Product page",
"class": "shopify-section--bordered",
"blocks": [
{
"type": "product_meta",
"name": "Product meta",
"limit": 1,
"settings": [
{
"type": "image_picker",
"id": "USPimage",
"label": "Image",
"default": "blank"
},
{
"type": "text",
"id": "USP1",
"label": "USP",
"default": "Gratis & eenvoudige retournering"
}
]
In my product-meta section I have this code to add the chosen image and text to the product-page:
{% if block.settings.USP1 and block.settings.USPimage != blank %}
{{ block.settings.USP1 | escape }}
{% elsif block.settings.USPimage == blank %}
{{ block.settings.USP1 | escape }}
{% endif %}
I now want to add multiple options for USP-rows without having to add them to the block settings manually. Is there any way to allow the user to add a USP-row in the editor without adding code to my block settings?
Basically, is there any way to allow another USP image & text in the editor without having to duplicate the same block settings I already have?
In the image below, the Image and USP should have an option in the editor to add another Image and USP, without me manually adding these to the block settings schema.
Sorry if my question is unclear, this is my first time posting to these forums. If things aren’t explained correctly please tell me and I will do my best to explain again!
