Jump to content

Is there a way I can remove the add to cart and pricing for specific products?

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://www.promaxxtool.com/accessories/

I'm unfamiliar with coding but I need to fix something for my work's site.

I tried putting this code in the page header code injection

<style>

.sqs-add-to-cart-button-wrapper {

    display: none !important;

}

.product-price { display:none }

.sqs-add-to-cart-button-inner { display:none }

</style>

which worked but it also deleted the add to cart and pricing for the entire accessories section which I did not want. Any suggestions?

Edited by arianapmt
Link to comment
  • Solution
6 hours ago, arianapmt said:

Site URL: https://www.promaxxtool.com/accessories/

I'm unfamiliar with coding but I need to fix something for my work's site.

I tried putting this code in the page header code injection

<style>

.sqs-add-to-cart-button-wrapper {

    display: none !important;

}

.product-price { display:none }

.sqs-add-to-cart-button-inner { display:none }

</style>

which worked but it also deleted the add to cart and pricing for the entire accessories section which I did not want. Any suggestions?

Each product has it own unique id, you can get it using this extension

https://chrome.google.com/webstore/detail/igjamfnifnkmecjidfbdipieoaeghcff

and replace the value accordingly '#item-6010f5ab70cb081ca25f4541 '


#item-6010f5ab70cb081ca25f4541 .sqs-add-to-cart-button-wrapper {

    display: none !important;

}

#item-6010f5ab70cb081ca25f4541 .product-price { display:none }

#item-6010f5ab70cb081ca25f4541 .sqs-add-to-cart-button-inner { display:none }

image.thumb.png.1dfe05d3e0a3462100f068c3051632ad.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

That helped so much thanks!! How do I remove the price from specific products on the product page? I tried the body id and then using .product-price { display:none !important;} but it did not work. It just removed the price from the entire product page which I did not want. Any ideas how to fix this? For example, I want the sketched images prices to be removed or not shown but I would like to keep the first three product's prices displayed. image.thumb.png.1f80fb9d1920199abf78080e5f4161ec.png

Link to comment

Add a tag to each product item you want to hide. Something like "grid-hide" (without the quotes).

Add the following to Store Settings > Advanced > Page Header Code Injection for the store page.

<style>

  .tag-grid-hide {
  
    display : none;
    
    }
    
  </style>

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

Link to comment

Hi @creedon thanks for the input however, I only wanted to hid the price of these products on the display page not the whole product itself. I have already hidden the product's price on the individual product pages. by using this format:

#item-5fbd5b62f0976242330c4ea7 .product-block .product-quantity-input { display: none !important; }
#item-5fbd5b62f0976242330c4ea7 .sqs-add-to-cart-button-wrapper { display: none !important; }
#item-5fbd5b62f0976242330c4ea7 .product-price { display:none }
#item-5fbd5b62f0976242330c4ea7 .sqs-add-to-cart-button-inner { display:none }

I just need code to hide the price from certain products (not all) on the product display page. Thanks!

Link to comment

No problem. Just need to target more specifically to hide the price.

Add a tag like "grid-price-hide".

Then use the following CSS.

<style>

  .tag-grid-price-hide .grid-prices,
  .tag-grid-price-hide .grid-meta-status .sale
  
    {
    
      display : none;
      
      }
      
  </style>

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

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.