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

Hi, I will be adding products to the "Memorial" subcategory's in my store shortly. All of these products under "Memorials" wont be avaliable to purchase, therefore could anyone help with code to remove the price, quantity and add to cart features on all products that come under "memorials" and the subcategorys. Although Other products on the site, which will be added to "Broces Jorda" and "Ceramic Flowers" will all work as normal and will need the price and basket feature etc. Could anybody help with the code to remove these features from any products in "memorial" abd subcategorys but not else where.

if you click hamburger menu at top, then shop. you will see the section I am referencing. as 
A link to my site is here ellipse-orange-2pwe.squarespace.com
 

site password is xxx by the way


Thankyou

 

Edited by CharlieReep
Link to comment
  • 6 months later...
7 hours ago, Olena_Khomyakova said:

I'm looking to disable price, add to card and quantity buttons 

Hi @Olena_Khomyakova 👋. Welcome to the forum!

You should not need to use the JavaScript in your screenshot. It will be easier to remove that code from the Code Injection panel and add this to Custom CSS panel instead:

.product-price, .product-quantity-input, .product-variants, .sqs-add-to-cart-button-wrapper {
  display : none!important; 
}

If you need any further guidance, please include the public password for your site, as it is currently protected by a site-wide password.

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
14 hours ago, paul2009 said:

Hi @Olena_Khomyakova 👋. Welcome to the forum!

You should not need to use the JavaScript in your screenshot. It will be easier to remove that code from the Code Injection panel and add this to Custom CSS panel instead:

.product-price, .product-quantity-input, .product-variants, .sqs-add-to-cart-button-wrapper {
  display : none!important; 
}

If you need any further guidance, please include the public password for your site, as it is currently protected by a site-wide password.

Did this help? Please give feedback by clicking an icon below  ⬇️

Thanks guys, it worked perfectly!!!

Link to comment
  • 3 weeks later...
6 minutes ago, JHoss1 said:

I would like to remove the Add to Cart button for one particular item.

Try adding this to Custom CSS:

article[data-item-id="62d06eaaa04ae44d0b7a223f"] .sqs-add-to-cart-button-wrapper {
  display: none!important; 
}

This refers to this product's unique ID (62d06eaaa04ae44d0b7a223f).

You can remove the quantity option by setting the stock level of this product to "1".

Let me know if this helped.

Please give feedback by clicking an icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
12 minutes ago, paul2009 said:

Try adding this to Custom CSS:

article[data-item-id="62d06eaaa04ae44d0b7a223f"] .sqs-add-to-cart-button-wrapper {
  display: none!important; 
}

This refers to this product's unique ID (62d06eaaa04ae44d0b7a223f).

You can remove the quantity option by setting the stock level of this product to "1".

Let me know if this helped.

Please give feedback by clicking an icon below  ⬇️

AMAZING. And so quick. Really appreciate your help!

Link to comment
  • 1 month later...
On 2/14/2024 at 8:29 PM, Estelle2022 said:

How to remove the "Add to card button" on a product page - client wish to use this as window shop and be contacted for purchase?

Thanks,

Estelle

Use this code to Website > Website Tools > Custom CSS

/* All products */
 div.sqs-add-to-cart-button-wrapper {
    display: none !important;
}

 

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
  • 4 weeks later...

The code to remove the add to cart button no longer works for me: www.theturfshed.com.au.

Does anyone have insight to an updated code?

.product-quantity-input {
 display:none !important;
}
.sqs-add-to-cart-button-wrapper {
    display: none !important;
}

Link to comment
1 hour ago, JaimieAllen said:

The code to remove the add to cart button no longer works for me

The correct code for your site with its settings is the following. Add to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection.

Remove any previous attempts at this effect.

<style>

  .ProductItem-details .product-quantity-input,
  .ProductItem-details .sqs-add-to-cart-button-wrapper
  
    {
    
      display : none;
      
      }
      
  </style>

This is for v7.1 and the store detail Layout set to Simple.

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

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.