Invalid value for type in block 'main-product-personalisation'.

AjitGoel
New Member
4 0 0

I am trying to make the changes shown below in the screenshot. To do this, I have created a liquid template file and updated the template/product.json file to use the type from the liquid template file. When trying to save the template/product.json file shopify is throwing "Invalid value for type in block 'main-product-personalisation'" error. What am I missing? 

 

snippets/main-product-personalisation.liquid:

 

<div class="product__description rte quick-add-hidden">
  some text and plan to add a textbox control
</div>

template/product.json

 

{
    "sections": {
        "main": {
            "type": "main-product",
            "blocks": {
                "2075f96e-ebee-4a0c-8e77-22c4790af4e0": {
                    "type": "custom_liquid",
                    "settings": {
                        "custom_liquid": "<div>\n  <label for=\"personalization\">Personalization<\/label>\n  <input id=\"personalization\" type=\"text\" name=\"properties[Personalization]\">\n<\/div>"
                    }
                },
                "main-product-personalisation": {
                    "type": "main-product-personalisation",
                    "settings": {}
                },
                "quantity_selector": {
                    "type": "quantity_selector",
                    "settings": {}
                }
            },
            "block_order": [
                "2075f96e-ebee-4a0c-8e77-22c4790af4e0",
                "main-product-personalisation",
                "quantity_selector"
            ],
            "settings": {
                "enable_sticky_info": true,
                "media_position": "left",
                "gallery_layout": "stacked",
                "media_size": "small",
                "mobile_thumbnails": "hide",
                "hide_variants": true,
                "enable_video_looping": false,
                "padding_top": 60,
                "padding_bottom": 0
            }
        },
    },

 

 

 

Pasted_Image_1_20_23__10_42_PM.jpg

Reply 1 (1)

EcomGraduates
Shopify Partner
588 48 78

hello there  

 

It looks like you're trying to create a custom block type in your Shopify store and are running into an error when trying to save the template/product.json file.

The error message you received - "Invalid value for type in block 'main-product-personalisation'" - suggests that there may be an issue with the way you've defined the "main-product-personalisation" block type in your template/product.json file.

 

  • Make sure that you've uploaded the liquid template file to your Shopify store and that it is properly linked to the "custom_liquid" setting for the "2075f96e-ebee-4a0c-8e77-22c4790af4e0" block.