We are sometimes asked to set a checkbox on the Shopify product screen so that the product cannot be purchased (cannot be added to the cart) if it is not checked. The setting method differs depending on the theme, but here is an example of the setting for the Dawn theme.
Sample Codes
Test Theme :Dawn/Rise 15.2.0
Add scheme to "main-product.liquid"
{
"type": "pre_purchase_checkbox",
"name": "t:sections.main-product.blocks.pre_purchase_checkbox.name",
"limit": 3,
"settings": [
{
"type": "textarea",
"id": "checkbox_label",
"default": "20歳以上です。この商品を購入することができます。",
"label": "t:sections.main-product.blocks.pre_purchase_checkbox.settings.checkbox_label.label",
"info": "t:sections.main-product.blocks.pre_purchase_checkbox.settings.checkbox_label.info"
}
]
},