Custom Liquid on Product Page- which is serving as a checkbox for Gift Aid

shpmarcus
New Member
2 0 0

Hi Shopify community,

We've installed some custom liquid using this tool - https://ui-elements-generator.myshopify.com/pages/line-item-property

This has been installed on to our product pages. This is an example - https://single-homeless-project-christmas-shop.myshopify.com/products/10-food-voucher

The main purpose of this is the 'Gift Aid my donation' Checkbox, which enables us to claim tax back meaning that for every £10  we receive £12.50.

However, when people are completing their orders we cannot see whether someone has ticked the checkbox and are unable to claim Gift Aid. 

Could anyone help us?

Thank you so much,

Marcus

Reply 1 (1)
shpmarcus
New Member
2 0 0

this is the code for the product page:

 

{
"sections": {
"main": {
"type": "main-product",
"blocks": {
"vendor": {
"type": "text",
"settings": {
"text": "{{ product.vendor }}",
"text_style": "uppercase"
}
},
"title": {
"type": "title",
"settings": {
}
},
"description": {
"type": "description",
"settings": {
}
},
"ae94118f-5061-4b9b-9264-a71f0a8ef0b3": {
"type": "text",
"settings": {
"text": "",
"text_style": "subtitle"
}
},
"subtitle": {
"type": "text",
"settings": {
"text": "{{ product.metafields.descriptors.subtitle.value }}",
"text_style": "subtitle"
}
},
"price": {
"type": "price",
"settings": {
}
},
"variant_picker": {
"type": "variant_picker",
"settings": {
"picker_type": "button"
}
},
"quantity_selector": {
"type": "quantity_selector",
"settings": {
}
},
"8b1d2d9d-5222-45a9-b892-d697852b259e": {
"type": "custom_liquid",
"settings": {
"custom_liquid": "Gift Aid my donation\n\n<p class=\"line-item-property__field\">\n <label>I want to Gift Aid my donation, any donations I make in the future, and any donations I've made in the past four years to Single Homeless Project. I am a UK taxpayer and understand that if I pay less Income Tax and\/or Capital Gains tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.<\/label><br>\n <input required class=\"required\" type=\"checkbox\" id=\"Gift-aid my donation\" hidden-data=\"I-want to Gift Aid my donation, any donations I make in the future, and any donations I've made in the past four years to Single Homeless Project. I am a UK taxpayer and understand that if I pay less Income Tax and\/or Capital Gains tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.\" onchange=\"fillHidden('I-want to Gift Aid my donation, any donations I make in the future, and any donations I've made in the past four years to Single Homeless Project. I am a UK taxpayer and understand that if I pay less Income Tax and\/or Capital Gains tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.')\" value=\"Gift aid my donation\"><label for=\"Gift-aid my donation\">Gift aid my donation<\/label><br>\n <input type=\"hidden\" id=\"I-want to Gift Aid my donation, any donations I make in the future, and any donations I've made in the past four years to Single Homeless Project. I am a UK taxpayer and understand that if I pay less Income Tax and\/or Capital Gains tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.\" name=\"properties[I want to Gift Aid my donation, any donations I make in the future, and any donations I've made in the past four years to Single Homeless Project. I am a UK taxpayer and understand that if I pay less Income Tax and\/or Capital Gains tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.]\">\n <script>\n function fillHidden(hiddenname) {\n var checkboxes = document.querySelectorAll('[hidden-data=\"'+hiddenname+'\"]');\n var hiddenfield = document.getElementById(hiddenname);\n hiddenfield.value = \"\"\n var i;\n for (i = 0; i < checkboxes.length; i++) {\n var x = checkboxes[i];\n if(x.checked){\n if(hiddenfield.value==\"\"){\n hiddenfield.value = x.value;\n }else{\n hiddenfield.value = hiddenfield.value + \", \" + x.value; \n } \n }\n }\n }\n <\/script>\n<\/p>"
}
},
"buy_buttons": {
"type": "buy_buttons",
"settings": {
"show_dynamic_checkout": false
}
},
"share": {
"type": "share",
"settings": {
"share_label": "Share"
}
}
},
"block_order": [
"vendor",
"title",
"description",
"ae94118f-5061-4b9b-9264-a71f0a8ef0b3",
"subtitle",
"price",
"variant_picker",
"quantity_selector",
"8b1d2d9d-5222-45a9-b892-d697852b259e",
"buy_buttons",
"share"
],
"settings": {
"enable_sticky_info": true,
"hide_variants": false,
"enable_video_looping": false
}
},
"product-recommendations": {
"type": "product-recommendations",
"disabled": true,
"settings": {
"heading": "You may also like",
"image_ratio": "square",
"show_secondary_image": false,
"add_image_padding": false,
"show_image_outline": true,
"show_vendor": false,
"show_rating": false
}
},
"163411360109e05f14": {
"type": "featured-collection",
"settings": {
"title": "Gift a Christmas dinner",
"collection": "food-vouchers",
"products_to_show": 2,
"show_view_all": false,
"swipe_on_mobile": true,
"image_ratio": "adapt",
"show_secondary_image": false,
"add_image_padding": false,
"show_image_outline": true,
"show_vendor": false,
"show_rating": false
}
}
},
"order": [
"main",
"product-recommendations",
"163411360109e05f14"
]
}