Jump to content

How to remove 'add to cart' button from certain products but not all in version 7.0

Go to solution Solved by paul2009,

Recommended Posts

Hi just to add - Most of my products are available by mail order, but some are services that people need to book in directly with me after a discussion, so it does not make sense to have Add To Cart on those pages.  Squarespace tell me that there is no way to remove it for individual pages, you have to remove it across the site.  However there is talk of coding to enter into the Product Page settings that will hide it - can anyone let me have this code and instruct me how to enter it?  Thank you.

 

Link to comment
  • Solution

You can do this by adding a tag to the products that don't require the Add to Cart button. Once added, you can add some CSS (styling code) to hide the button on these products. 

For example, if you add a tag with the name "no-order" to a product, you could add the following to Design > Custom CSS to hide the Add to Cart button on just this product.

.tag-no-order .ProductItem-details .sqs-add-to-cart-button-wrapper {
  display: none;
}

If you call your tag something other than "no-order" change the first class (.tag-no-order) to match.

If this helps you, please click "Like" below  ⬇️

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
4 hours ago, paul2009 said:

You can do this by adding a tag to the products that don't require the Add to Cart button. Once added, you can add some CSS (styling code) to hide the button on these products. 

For example, if you add a tag with the name "no-order" to a product, you could add the following to Design > Custom CSS to hide the Add to Cart button on just this product.


.tag-no-order .ProductItem-details .sqs-add-to-cart-button-wrapper {
  display: none;
}

If you call your tag something other than "no-order" change the first class (.tag-no-order) to match.

If this helps you, please click "Like" below  ⬇️

Thank you so, so much Paul2009 - it has worked like a charm.  And there was me thinking it was impossible!  I am incredibly grateful and have certainly noted down your business which I will heartily recommend to all my contacts.  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.