I have a Shopify store and I want only customers who log in to see the product prices. Right now, everyone who visits my store, even guests who are not logged in, can see the prices. I want to hide the prices from guests and show them only after customers log in. How can I do that?
Hey @Paytowin
You’ve got two routes here:
1. Use an app: There are a few solid ones that handle this without any code:
- B2B/Wholesale Lock Manager by Wholesale Helper
- Locksmith by Lightward
- B2B Login/Lock & Hide Price by BSS Commerce
These work well but they do come with a monthly fee (usually $5–$20/mo), and some can slow things down depending on how they inject the logic.
2. Custom Liquid code: You can actually do this natively by checking the customer object in your theme’s Liquid files. If customer is not logged in, you hide the price and show a “Login to see pricing” message instead. No app needed, no monthly cost, and it’s cleaner performance-wise. It does require editing your theme files though, specifically your product template, collection cards, and cart so you’d want someone comfortable with Liquid handling it.
If you’re not sure which route fits better or want to go the custom code route, feel free to reach out, I can set it up for you without any apps.
Hope that helps! If it did, a Like and Marking it as Solution goes a long way and helps others find the fix faster too.
Best,
Moeed
If you’re on Shopify Plus, there’s a native feature for this inside their B2B tools worth exploring with Shopify Support if that’s your plan.
For everyone else, the cleanest option is a small change to your theme’s Liquid code. There’s a variable called customer that is populated when a buyer is logged in and null when they’re not. You just wrap your price in an IF block if customer exists, show the price; if not, show a “log in to see price” link instead. Here’s a sample:
liquid
{% if customer %}
{{ product.price | money }}
{% else %}
Log in to see price
{% endif %}
The tricky part is just finding the right file to put it in. Depending on your theme it’ll be something like price.liquid, product-price.liquid, or inside main-product.liquid. Easiest way to find it open your theme code editor and search for product.price. That takes you straight to where the price is being rendered.
Just make sure you duplicate your theme before touching anything. Takes 10 seconds and saves a lot of pain.
If you’d rather not touch code at all, there are apps on the App Store built specifically for this search “login to see price” and you’ll find a few solid options.
If you go the theme route, let me know which theme you’re using and I can point you to the exact file.
This can be done without using any app at all. you’ll just need to make one simple adjustment to your theme in Liquid code.
It only requires one file, which manages pricing on both products and collections in virtually any theme (such as Dawn).
Click on Online Store > Themes > ⋯ > Edit Code
From the list on the left-hand side, click on the Snippets folder, then open price.liquid.
You’ll now wrap all code in that file like this:
{% if customer %}
Also Hide Add to Cart Button
Guests who can’t see prices also shouldn’t be able to add items to cart. The cleanest way is to add a CSS rule only for guest users in your theme.liquid file.
Open layout/theme.liquid
Find the closing tag
Paste this just before it:
{% unless customer %}
form[action="/cart/add"] { display: none !important; }{% endunless %}