This file contains the following errors: Error: Invalid JSON: unexpected token

Hi, I’m running the Debutify theme 4.5.0 and I’m trying to add the abandoned cart reminder snippet from Klaviyo using these instructions: https://help.klaviyo.com/hc/en-us/articles/115001396711-Create-a-Custom-Add-to-Cart-Event-for-Shopify & I’m getting the above error when trying to save it, can anyone help?

{
“sections”: {
“main”: {
“type”: “product-template”,
“settings”: {
“show_product_vendor”: false,
“show_product_type”: true,
“show_product_sku”: false,
“product_title_large”: false,
“show_product_tags”: true,
“show_sharing_icons”: true,
“show_product_collections”: true,
“enable_fading_effect”: false,
“enable_image_zoom”: true,
“enable_video_looping”: true,
“media_layout”: “thumbnails”,
“image_size”: “medium”,
“quantity_enabled”: true,
“product_selector”: “select”,
“show_product_description”: true,
“enable_split_description”: false,
“description_full”: false,
“dbtfy_product_description_position”: “separate_section”,
“description_style”: “section-border”,
“text_alignment”: “text-center”,
“text_alignment_mobile”: “small–text-center”
}
},
“upsell-bundles”: {
“type”: “dbtfy-upsell-bundles”,
“settings”: {
“dbtfy_upsell_bundles_title”: “Frequently bought together”,
“dbtfy_upsell_bundles_subtitle”: “”,
“dbtfy_upsell_bundles_total”: “Total price:”,
“dbtfy_upsell_bundles_cart”: “Add selected items”,
“dbtfy_upsell_bundles_icons”: “library_add_check”,
“dbtfy_upsell_bundles_current”: “This item:”,
“section_style”: “section-border”,
“dbtfy_upsell_bundles_reviews”: false,
“show_automatic_bundles”: true,
“dbtfy_upsell_bundles_limit”: “2”,
“dbtfy_upsell_bundles_position”: “product”,
“dbtfy_upsell_bundles_discount_code”: “”,
“dbtfy_upsell_bundles_discount_amount”: “”,
“dbtfy_upsell_bundles_discount_type”: “%”
}
},
“pricing-table”: {
“type”: “dbtfy-pricing-table”,
“settings”: {
“show_on_desktop”: true,
“show_on_mobile”: true,
“title”: “Pricing table”,
“subtitle”: “”,
“section_style”: “section-blank”,
“dbtfy_button_position”: “middle”
}
},
“review-widget”: {
“type”: “product-review-widget”,
“settings”: {
}
},
“faq-section”: {
“type”: “dbtfy-faq-section”,
“settings”: {
“show_on_desktop”: true,
“show_on_mobile”: true,
“title”: “FAQ”,
“subtitle”: “”,
“section_style”: “section-border”,
“dbtfy_faq_searchbox”: true,
“dbtfy_faq_search_placeholder”: “Search questions…”,
“dbtfy_faq_bannerbox”: true,
“dbtfy_faq_banner_icon”: “live_help”,
“dbtfy_faq_banner_text”: “Didn’t find your answer?”,
“dbtfy_faq_banner_subtitle”: “Our customer service will be happy to help you.”,
“dbtfy_faq_btn”: “Get in Touch”,
“dbtfy_faq_link”: “”
}
},
“related-products”: {
“type”: “related-products”,
“settings”: {
“show_related_products”: false,
“related_collection”: true,
“same_vendor”: false,
“same_type”: false,
“never_empty”: true,
“title”: “You may also like”,
“subtitle”: “”,
“section_style”: “section-border”,
“rows”: “1”,
“desktop_grid”: “4”,
“mobile_grid”: “2”,
“slider_related_products”: true,
“arrows”: true,
“dots”: true,
“autoplay”: false,
“autoplayspeed”: 5
}
},
“back-to-collection”: {
“type”: “product-back-to-collection”,
“settings”: {
}
},
“quotes”: {
“type”: “quotes”,
“settings”: {
“show_on_desktop”: true,
“show_on_mobile”: true,
“title”: “Testimonials”,
“subtitle”: “”,
“section_style”: “section-blank”,
“quote_width”: “60”,
“arrows”: true,
“dots”: true,
“autoplay”: true,
“autoplayspeed”: 5
}
},
“loox-product-reviews-app-section”: {
“type”: “apps”,
“blocks”: {
“loox-product-reviews”: {
“type”: “shopify://apps/loox-photo-reviews/blocks/loox-dynamic-section/5c3b337f-fd14-4df5-b1d6-80ec13e6e28e”,
“settings”: {
“only_photos”: false,
“aggregated”: true,
“hide_thumbnails”: false,
“maxwidth”: 1080
}
},
“d657a289-4d65-4a77-9839-259f8b6b5b4e”: {
“type”: “shopify://apps/loox-photo-reviews/blocks/loox-dynamic-section/5c3b337f-fd14-4df5-b1d6-80ec13e6e28e”,
“settings”: {
“only_photos”: false,
“aggregated”: true,
“hide_thumbnails”: false,
“maxwidth”: 1080
}
}
},
“block_order”: [
“loox-product-reviews”,
“d657a289-4d65-4a77-9839-259f8b6b5b4e”
],
“settings”: {
}
},
“product-recommendations”: {
“type”: “product-recommendations”,
“settings”: {
“show_product_recommendations”: true,
“title”: “Recommended for you”,
“subtitle”: “”,
“section_style”: “section-border”,
“rows”: “2”,
“desktop_grid”: “4”,
“mobile_grid”: “2”,
“slider_related_products”: true,
“arrows”: true,
“dots”: true,
“autoplay”: false,
“autoplayspeed”: 5
}
}
},
“order”: [
“main”,
“upsell-bundles”,
“pricing-table”,
“review-widget”,
“faq-section”,
“related-products”,
“back-to-collection”,
“quotes”,
“loox-product-reviews-app-section”,
“product-recommendations”
]
}

Hey @ZA94 ,

The script is being added to the incorrect file. You cannot add JavaScript to a JSON file, hence why the error is appearing.

As mentioned in the Klaviyo guide, you should add the following script to the theme.liquid file before the closing tag.


Please find the screenshot as a reference:

Thank you for choosing Debutify!
Technical Support Team | Debutify CORP