Jump to content

Looking to remove or disable the add to cart button on the product page

Go to solution Solved by tuanphan,

Recommended Posts

2 hours ago, Ilan said:

I went to the sales and products pages, went to design and site styles, just like you said, but nothing!

When you got to the Style page after visiting the product detail page, did you hover and click around the area of the add to cart button? Hovering shows what elements have tweaks and click in an area with tweaks should bring up those tweaks in the Styles panel. Sometimes you have to scroll the styles to find the option.

Let us now what you find.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Yes, you are aright. It does work when I am in a specific product's page. That is great. I will do that as well.

However, we also have a shop page, where all our products are displayed one after the other. There, one can also "add to cart" a product he wants (in other words you don't really have to go inside the item's page). And on that page, I can not get the option to hide the button. Is there any way for that?

Thank you 🙂

Link to comment
2 hours ago, Ilan said:

Is there any way for that?

Add the following to Design > Custom CSS.

.sqs-block-product .productDetails.center .product-quantity-input,
.sqs-block-product .productDetails.center .sqs-add-to-cart-button-wrapper

  {
  
    display : none;
    
    }

This is for v7.0 using the Brine template family.

Be sure to remove this CSS when you open again! 🙂 

Alternately you could comment it out by enclosing in /* and */ for use later.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 5/25/2022 at 3:21 AM, creedon said:

Add the following to Design > Custom CSS.

.sqs-block-product .productDetails.center .product-quantity-input,
.sqs-block-product .productDetails.center .sqs-add-to-cart-button-wrapper

  {
  
    display : none;
    
    }

This is for v7.0 using the Brine template family.

Be sure to remove this CSS when you open again! 🙂 

Alternately you could comment it out by enclosing in /* and */ for use later.

Let us know how it goes.

Wow, this really worked perfectly.

 

Thank you ever so much and my apologies for the late reply. I'm abroad and didn't have much computer access. Great support. 

 

Much love 🙂

Link to comment

Hi,

My code has suddenly stopped working and I cannot get it to work. I have a tag as priceonrequest to hide the price and the add to cart for these products. The hidden price code is working but not the hidden cart. Can someone please help me 

www.icegalleries.com

Link to comment
10 hours ago, lianne0 said:

The hidden price code is working but not the hidden cart.

Please post the URL of a specific product you are having an issue with so we don't have to hunt for it.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 6/3/2022 at 4:48 AM, lianne0 said:

My code has suddenly stopped working and I cannot get it to work.

Your code has syntax errors. I had trouble following what you are trying to accomplish in the CSS exactly so I was unable to come up with fixes.

I get that you want to hide some elements when the priceonrequest tag is applied to a product.

Perhaps you could describe what you want to happen when the tag is present and we might be able to come at it from that direction.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@creedon

I am wondering if it has something to do with adding a second store (which I have now deleted) as the code was working fine before this.

I need to be able to hide the add to cart button on certain products over a certain price. The hide price seems to be working but the add to cart is not hidden, and customers can still add to basket (which presents the price) 

The code I originally had in the custom CSS was working for the priceonrequest tab and it no longer is. I have tried to update code, from different posts and suggestions on the SS threads, but nothing appears to be working. 

Link to comment

@lianne0

So your only requirement is when you set the tag priceonrequest for a product, the price and add to cart button are hidden. Correct? If there are other conditions please list them. It would help to know, when x is done, I want y result.

As second store should not have an effect on CSS.

As I say there are syntax errors in your CSS so things won't work until that is taken care of.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@lianne0

Remove, make a copy somewhere, previous attempts at this effect.

Add the following to Design > Custom CSS.

.tag-priceonrequest .ProductItem-details .ProductItem-product-price,
.tag-priceonrequest .ProductItem-details .sqs-add-to-cart-button-wrapper

  {
  
    display: none
    
    }

This is for v7.1 and specific to the posters need.

On the syntax errors. I misspoke. I was referring to difficulty in reading the ruleset selectors, which should not be a problem after updating the CSS.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
6 hours ago, lianne0 said:

This has not hidden the add to cart sadly.

Is the code installed now? I can take a look. I assure you it did work when I created it here locally. Did you look at the page in private browsing?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
1 hour ago, Vishy said:

I'm also having issue removing add cart and quantity.

Please provide more detail on the effect you want to achieve. Do you want to remove all atc buttons? Do you want to remove it on some products? What methods have you tried to remove the atc button?

Also you have set a site-wide password but not provided us with the password.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 6/7/2022 at 5:10 PM, Lee211 said:

Hello, the add to cart button not working on my store page. Im either wanting to remove it or get it functional with quantity.

I just tested your add to cart buttons and they worked for me. Quantity works as well. In what way are they not working for you?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 1 month later...
On 8/17/2022 at 11:52 PM, afaris said:

 

Site URL: https://www.andrewfaris.com/2022/30x40-untitled01

Hello All,

I would like to remove 'Add to Cart' buttons on specific product pages throughout my site. Here is an example of a page with the 'Add to Cart' button that I would like to remove. I appreciate any help.

I am using Supply Template 7.0

Thanks,

Andrew

Edit product > Additional Info > Add a Code BLock > Paste this code

<style>
  /* Remove add to cart */
  div.sqs-add-to-cart-button-wrapper {
    display: none !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
On 10/24/2022 at 12:55 AM, Jordan123 said:

Hello, 

How can I remove the 'add to cart' and price button on just 2 products? 

-Strength and conditioning coaching

-Strength and Conditioning Mentorship

https://violin-arugula-mzln.squarespace.com/

Edit 2 products > Additional Info > Add a Code Block > paste this code

<style>
  /* Remove add to cart */
  div.sqs-add-to-cart-button-wrapper {
    display: none !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
On 10/26/2022 at 3:44 PM, Jordan123 said:

Thank you! How about removing the price of the product?

Use this new code

<style>
  /* Remove add to cart */
  div.sqs-add-to-cart-button-wrapper, .product-price {
    display: none !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.