Jump to content

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

Recommended Posts

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

Link to comment
  • Replies 7
  • Views 380
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment

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

Link to comment
  • 1 month later...

@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
Link to comment
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.

Link to comment

@creedon - thanks for the follow-up. Appreciate it.
ok, here you go:

 

URL
https://dalmatian-pug-cs5j.squarespace.com/mont-alpi-deluxe-series/p/mai805-dkegfc

this is one of many products where the same issue occurs. Scroll down to the bottom of the page where the related products sit, and you can see pricing. 

The site is password protected but about to go live. - montalpi2023

Edited by Purcho
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.