Jump to content

Hidden Prices

Go to solution Solved by tuanphan,

Recommended Posts

Hi - I'm wondering if anyone can help me out - I'm working on a new site (not yet posted - so link provided is not correct) and I have a requirement (from manufacturer) that some products can only show prices when put into the shopping cart.  I know I can solve this at a site level, but the problem is I have services and other products that I want the prices to display for on the product pages.  I'm unsure how to solve for this.

I was trying to use (initially) this code (for each product that needs the price hidden)

[data-section-id="6055b328552222411afff759"] {

 

//CSS Hide Price

.sqs-money-native, .product-price {display:none;}

 

}

But - I believe the section-id is dynamic (at least before the site is published / live). 

It's also possible that I'm just stuck on stupid - because this particular problem is very new to me and I am by no means an expert in CSS or Java or any language really.. 

Would appreciate any help I can get. 

To summarize: 

- I want to be able to hide pricing until it's in the shopping cart for some products

- I want to be able to show the pricing for other products

Thanks

JT

Link to comment
  • Solution

Data-section-id of a specific section is Fixed, it won't change.

To hide Price on a store/category page, you can use this code to Page Header Code Injection

<style>
  .product-price {
  	display: none !important;
  }
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

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.