Jump to content

How to only show product prices for logged in members

Recommended Posts

Posted

Hi!

I'm working on a website and trying to work out the best way to customize so that logged in members are able to see product prices across the website but non-members can not. The site is intended as a wholesale store and would be issuing accounts to their clients only.

I've had a look at various code fixes like:

Quote
.products.collection-content-wrapper .grid-prices {
  display:none;
}

.products.collection-content-wrapper .grid-meta-status {
  display:none;
}

 

.product-price {
  display:none;
}

 

.ProductItem .ProductItem-details .variant-option {
  display:none;
}

But these all work across the whole site, trying to work out a solution possibly using member areas or code to make this work any help appreciated 🙂

  • Replies 4
  • Views 2.1k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
5 hours ago, Leinefae said:

I'm working on a website and trying to work out the best way to customize so that logged in members are able to see product prices across the website but non-members can not.

If you want to protect the products and the prices, you can password-protect the Store page to prevent the public from viewing it. This will also protect the page from search engines.

If you want the products to be visible to the public, and you only want to protect the prices, you may want to consider creating a duplicate public Store page that does not contain prices. If you include prices on the page and just "hide" them with CSS, they are still searchable and can be viewed by anyone who knows how to use the built-in browser tools.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

Thank you! 

Trying for the latter option of having products visible to the public and only prices hidden. Really great tip for the hiding with CSS being searchable still. 

So one option would be making two duplicate product pages one without prices and one with, and somehow setting up a system of "if logged in then show this product page, if logged out show that product page"?

Seems like a huge workaround for something that is pretty commonplace on other sites - my site will have multiple product categories and product pages which would be a huge amount of extra page building and mapping.

  • 2 weeks later...
  • 11 months 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.