Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi folks,
I use Out of the Sandbox's Turbo theme. I'm looking for some help hiding the Add to Cart button within the Product Templates workflow. I have found a way to remove the add to cart button on a sitewide level but I need to remove it specifically from certain products. I have some products that we are prohibited from selling online per our dealer agreement but that'd I'd still like to show as available/display sizing for but prohibit from being added to the cart. A lot of our local customers use the webstore to check size & style availability before heading in.
Usually, I would duplicate and edit the product-template.liquid file but I can't find any reference to the add_to_cart element.
Here's an article explaining how to do this on a sitewide level:
And here is the .json Product Template I am attempting to edit to achieve the desired effect:
{
"wrapper": "div.shopify-section-wrapper.section",
"sections": {
"sidebar": {
"type": "product-sidebar",
"settings": {
}
},
"main": {
"type": "product-template",
"blocks": {
"title": {
"type": "title",
"settings": {
}
},
"price": {
"type": "price",
"settings": {
}
},
"description": {
"type": "description",
"settings": {
}
},
"form": {
"type": "form",
"settings": {
}
},
"share": {
"type": "share",
"settings": {
}
}
},
"block_order": [
"title",
"price",
"description",
"form",
"share"
],
"settings": {
}
},
"recently-viewed": {
"type": "recently-viewed",
"settings": {
}
},
"recommendations": {
"type": "product-recommendations",
"settings": {
"show_product_recommendations": true
}
}
},
"order": [
"sidebar",
"main",
"recently-viewed",
"recommendations"
]
}
Inserting the
#add-to-cart, .add_to_cart {display: none !important;}
line to the above template page just results in an error in the .json file and the cart functionality is unchanged. It's possible I have it in the wrong place or formatted incorrectly as my knowledge in this area is limited, but I think since there's no reference in the template file for #add-to-cart it's not with code format/placement it's that it's not the right snippet.
Anyone have any ideas?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025