Jump to content

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

Recommended Posts

  • Replies 3
  • Views 456
  • Created
  • Last Reply

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

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  ⬇️

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.