How to Hide Product Prices and Show “Login to View Price”
If you want to hide the prices of your products and show “login to view price” instead, this easy guide will help you do it without any trouble. By following these steps, you can create a shopping experience that encourages visitors to sign up for an account.
By the end of this guide, you will know how to hide prices until someone logs in!
“An e-commerce business is not just about selling online; it’s about creating trust and delivering value.”
Steps to Hide Prices Until Logged In
Step 1: Go to the Theme Editor
First, log in to your Shopify admin. This is the place where you manage your online store. Once you’re logged in, look for the menu on the left side of the screen.
- Click on “Online Store.”
- Then, click on “Themes.”
Now, you will see your current theme and some options related to it.
Next, find the three dots next to the “Customize” button. Click on these three dots and choose “Edit code” for your current theme. This will open up a special area where you can change how your store looks and works.
Step 2: Add Code to the Theme File

Now that you’re in the code editor, look for a file called “theme.liquid.” This file controls many parts of your store’s design.
- In the Theme File editor, find “theme.liquid.”
- Open this file by clicking on it.
Once you have it open, you need to add some code that will hide the prices. Look for the closing </body> tag at the bottom of the file. You will want to paste your code just before this tag.
Here’s a simple example of what you might add:
xml
{% if customer %}
<!– Show price –>
{% else %}
<p>Login to view price</p>
{% endif %}
This code checks if someone is logged in (a customer). If they are not logged in, it shows “Login to view price.” You can change this message to anything you want! For example, you might say “Please log in to see prices.”
After you make your changes, don’t forget to click “Save.” This is very important because if you don’t save, your changes won’t work!
Step 3: Check If It Works

Now it’s time to see if everything is working correctly! Open a new tab in your web browser and visit your store without logging in.
- Browse through some products.
- You should see that the product prices are hidden! Instead of showing prices, it says “Login to view price.”
This means that people who are not logged in cannot see the prices on product pages or collection pages. This is exactly what we wanted!
Why Hide Prices?
Hiding prices can be a smart way to encourage visitors to create an account with your store. When they sign up, they can see all the prices and special offers available just for them.
Here are some reasons why hiding prices can be beneficial:
- Encourages Sign-Ups: When visitors see that they need to log in to see prices, they may be more likely to create an account.
- Builds Customer Relationships: Having customers sign up allows you to send them emails about special deals and new products.
- Creates a Sense of Exclusivity: When people feel like they are part of a special group that gets access to certain information (like prices), they may feel more connected to your brand.
Make Your Products Easy to Share
Another fun way to engage with customers is by adding a WhatsApp share button. This lets your customers share their favorite products with friends and family, which helps more people learn about your store!
How to Add a WhatsApp Share Button
- Go Back to the Theme Editor: Just like before, go back into your theme editor.
- Find the Right File: Look for a file where you can add buttons or links for sharing. This might be in a section like “product.liquid.”
- Add the Share Button Code: You can find simple code online that lets you create a WhatsApp share button. Here’s an example of what that code might look like:
xml
<a href=”https://api.whatsapp.com/send?text=Check out this product! [Product Link]” target=”_blank”>Share on WhatsApp</a>
Replace [Product Link] with the actual link of the product page so customers can easily share it.
- Save Your Changes: Don’t forget to save after adding the button!
Benefits of Sharing
When customers share products:
- More People See Your Store: Friends and family might be interested in what they see when shared.
- Increased Sales: More visitors can lead to more sales!
- Builds Community: Sharing helps create a community around your brand.
Final Thoughts
By hiding product prices and encouraging logins, you can create a more engaging shopping experience for your customers. Adding share buttons makes it even easier for them to spread the word about your store!
These steps are simple but powerful tools that can help grow your business and connect with more customers. Now you’re ready to make some exciting changes! Have fun setting up your store!