Jump to content

I want to hide the "Add to cart button" from product pages

Recommended Posts

Posted

I'm busy designing an online brochure for a client who sells BBQ grills throught Wayfair. They want product description pages, but since the products are sold via wayfair and others like it, they don't need price, etc and add to cart (all things typically associated with commerce pages on SS)

I found some code to help me hide pricing and quantity. The code I used is below.

But I can't figure out how to hide the add to cart button (see screenshot added). Any suggestions for code injection?

<style>

  /* hide price */
  
  .ProductItem-details .ProductItem-product-price, /* layout simple */
  .pdp-details .pdp-details-price /* layouts full, half, wrap */
  
    {
    
      display : none;
      
      }
      
  </style>

Screen Shot 2023-02-15 at 4.31.00 PM.png

  • Replies 11
  • Views 928
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

Please see the following.

It is generalized code and you comment out the lines of the elements you don't want to hide. If you use it remove my code that you have currently installed.

Let us know how it goes.

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.

Posted

Hey there @creedon - thanks. I actually found the code I used to hide price, and quantity posted in response to somebody's question last year. The code works for hiding price, seems to work for hiding quantity too. But, what I can't figure is how to hide the add to cart button.

To be brutally honest, I don't really need a store/shop/commerce function. I'd much rather have a gallery block, and thumbs, and copy on the right I can control on their 'fluid page design'. But I can't find that as a template anywhere. A commerce template is the only template I can find on squarespace that offers the gallery+thumbs on the left, and the space for title and body copy on the right. Having breadcrumbs is a bonus.

So, I either try my darned hardest to figure out how to hide that button. Or somebody needs to prove me wrong/show me where in SqSpace templateland this gallery and description style might exist. (see screenshot below for my ideal layout. )

Anyway, thanks for responding, and I am glad I found your code on the forum to hide price. I'm part way there.

Screen Shot 2023-02-15 at 4.03.51 PM.png

Posted

@creedon - hey there, I  re-read your comment above and realised you were redirecting me to some earlier posts. Sorry, first time at the rodeo so-to-speak. Anyway, I followed the trail and sorted out hiding everything I needed. Thank you.!

  • 1 month later...
Posted (edited)

@creedon- I might be going out on a limb here, but since you were so helpful about a month ago, I thought I'd ask.

I have a 108 products set up in my client website's inventory. And on each item, I have Related Products enabled. However, when I do that, the pricing appears under the related product. My client does not want to show price. About a month ago you directed me to the solution that hid pricing and add-to-cart from the PDP. I now need to figure out if there is a way to hide the related product pricing?

If you can't help, no worries. But I thought I'd give it a go.

Screen Shot 2023-03-31 at 2.16.00 PM.png

Edited by Purcho
Posted
1 hour ago, Purcho said:

I have a 108 products set up in my client website's inventory. And on each item, I have Related Products enabled. However, when I do that, the pricing appears under the related product. My client does not want to show price.

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

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.

  • 1 year later...
Posted

website url: https://potato-snail-d9lk.squarespace.com/
password: f3sms

I want to showcase the products as a catalogue and not have the e-commerce functionality set up. How to disable to add to cart button on the product pages? I only want to showcase the product information, the site will be a catalogue based site not e-commerce. Any help would be appreciated, thanks! 

Screenshot 2024-10-11 at 7.33.39 PM.png

Screenshot 2024-10-11 at 7.35.01 PM.png

Posted

@creedon i checked the thread, i dont want to hide the add to cart for just one project - i want to disable it entirely. As i want it to be a catakogue site. What code to add?

this 

#item-6664ce323f55227efcde0245 .ProductItem-quantity-add-to-cart{
    display: none !important;
}

or this
 

<style>

  @media screen and ( min-width : 768px ) {
  
    .tweak-product-basic-item-add-to-cart-standalone .ProductItem .ProductItem-quantity-add-to-cart {
    
      display : none;
      
      }
      
    }
    
  @media screen and ( max-width : 767px ) {
  
    .tweak-product-basic-item-add-to-cart-mobile-standalone .ProductItem .ProductItem-quantity-add-to-cart {
    
      display : none;
      
      }
      
    }
    
  </style>

very confused .. 

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.