Turbo Theme: Remove Add to Cart in Product Templates

Turbo Theme: Remove Add to Cart in Product Templates

voyageurgoods
Visitor
3 0 0

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:

https://help.outofthesandbox.com/hc/en-us/articles/115006910827-How-Do-I-Hide-the-Price-Cart-Icon-or...

 

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?

Replies 0 (0)