Jump to content

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

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?

Link to comment
  • Replies 5
  • Views 924
  • Created
  • Last Reply
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

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, 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 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

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 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.