Jump to content

Hiding 'Add to Cart' and Price for Certain Product Listings

Recommended Posts

Site URL: https://www.gracelanesmithart.com

Hello, 

I listed my portfolio pages as shop pages so it would be easy to move products from shop to portfolio and vice versa. 

I added CSS in an effort to hide the 'Add to Cart' button and price for items listed in portfolio pages with the tag 'portfolio' to activate this. This is code that I got from a fellow 7.0 Brine user and it works for her.

Here is the code:

image.png.b83e9c2a99e2454bbcee452da2e3b7b2.png

Unfortunately that code doesn't work unless I add another set of code in Settings --> Advanced --> Inject Code. 

Here is the code: 

image.png.463f5226d8d514358e1e9938820a8b4b.png

This actually works properly in hiding both price and 'Add to Cart' button for shop listings disguised as portfolio listings, except for one hiccup. 

While the price and button shows up in the Shop page (without the portfolio tag), the button is just a button - the text 'Add to Cart' has been erased. The button works, but there is no text to make it obvious that it is an 'Add to Cart' function. See screenshot. 786050075_ScreenShot2021-04-15at11_25_28PM.png.20c6e0da5190b5c0e8ca4109f43b9ce6.png

My site runs on the Brine template in Squarespace 7.0.

Please can someone help? I've been trying to figure this out for weeks. In the meantime I removed the code and have items showing up with all products listed as $0 even though they're filed under portfolio. 

Thank you!

Link to comment
  • Replies 1
  • Views 526
  • Created
  • Last Reply

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.