Hello! I am using the Flex theme and have created a custom template. I want this new template to have a unique ‘Add to Cart’ button, but am having a hard time calling the correct form in my new template.
I’ve created the product.custom.json template, plus a product__main-custom.liquid section, and a product__form-custom.liquid snippet but am unable to tie them all together to display the custom ‘add to cart’ button.
My custom template looks like the below so far. Any help would be much appreciated!
{
"sections": {
"breadcrumbs": {
"type": "product__breadcrumb",
"disabled": true,
"settings": {
"width": "standard",
"padding_top": 20,
"padding_bottom": 20,
"css_class": "",
"custom_css": ""
}
},
"main": {
"type": "product__main-custom",
"blocks": {
"2454949b-801c-4476-a332-29ce45fb095b": {
"type": "form",
"settings": {
"show_payment_button": false
}
}
},
"block_order": [
"2454949b-801c-4476-a332-29ce45fb095b"
],
"settings": {
"product_images_position": "right",
"set_product_height": false,
"product_height": 500,
"video_looping": false,
"gallery_arrows": true,
"enable_zoom": false,
"enable_product_lightbox": false,
"slideshow_speed": 0,
"slideshow_transition": "slide",
"display_thumbnails": true,
"thumbnail_position": "bottom-thumbnails",
"enable_thumbnail_slider": true,
"width": "standard",
"padding_top": 40,
"padding_bottom": 20,
"animation": "fadeIn",
"css_class": "",
"custom_css": ".price {\nmargin-top: 20px !important;\nfont-size: 22px;\nwidth: 100%;\n} \n\n.shopify-installments {\nmargin-left: 0px !important;\nmargin-bottom: 0px !important;\n}\n\n.purchase-details {\nmargin-top: -45px !important;\n}\n\n.product-text {\nmargin-top: 20px;\nfont-size: 14px;\ncolor: #F0B323;\n}"
}
},
"recommendations": {
"type": "product__recommendations",
"disabled": true,
"settings": {
"show_product_recommendations": false,
"product_recommendations_style": "grid",
"product_recommendations_heading": "You may also like",
"products_per": 3,
"recommended_products_limit": 6,
"align_height": false,
"collection_height": 200,
"width": "standard",
"padding_top": 20,
"padding_bottom": 20,
"animation": "none",
"css_class": "",
"custom_css": ""
}
}
},
"order": [
"breadcrumbs",
"main",
"recommendations"
]
}