How to Add Login to View Price in Shopify? 

If you want to hide the product price and display “login to view price” in your Shopify, this simple guide will help you to achieve it without any technical hassles.  

At the end of the blog, we will be able to achieve the following if you follow all the instructions correctly. 

Hide Price in Frontend

Shopify Login for Pricing: 2 Methods 

There are two practical ways to hide prices until a customer logs in on Shopify:

Method 1: Custom Code

You manually edit your theme’s Liquid files to hide price elements for guest visitors.

This works well if you’re comfortable with code and want a lightweight, no-cost solution. However, it may require updates whenever your theme changes, and it doesn’t give you a polished “Login to View Price” button experience out of the box.

Method 2: Shopify App

You use a dedicated login to view the price Shopify app that handles price hiding through a simple dashboard — no coding required.

This method gives you more control: you can choose which pages, products, or customer groups to target, customize the button text, and show a “Login to View Price” or “Get a Quote” button automatically.

Both methods are covered step-by-step below.

Steps to Hide Price Until Logged in to Shopify Via Code

Step 1: Navigate to Theme Editor 

Login to your Shopify admin and head to Online Store > Themes

Navigate to Themes

Then, click on the three dots beside the Customize button and select Edit code for your current theme.

Edit Code

Step 2: Add the Code to The theme.liquid file

Next, head to theme.liquid and in the Theme File editor, open the theme.liquid file and paste the following code before the closing </body> tag:

<script>
  window.isLoggedIn = {% if customer %} true {% else %} false {% endif %};

  document.addEventListener('DOMContentLoaded', function() {
    var priceElements = document.querySelectorAll('.product-price, .price, .product-card__price');

    priceElements.forEach(function(priceElement) {
      if (window.isLoggedIn) {
        priceElement.style.display = 'inline';
      } else {
        priceElement.style.display = 'none';
        var loginMessage = document.createElement('span');
        loginMessage.innerHTML = '<a href="/account/login">Login</a> to view price';
        priceElement.parentNode.appendChild(loginMessage); // Add the login message next to the price element
      }
    });
  });
</script>

You can modify the messaging that you would like to keep instead of “login to see the price” and click Save. 

Add the Code to the theme.liquid file

Step 3: Hide Price in the Front End 

Test the functionality, try browsing your Shopify store without login and you will notice the product prices are hidden. This simple method will not display pricing to the guest (not logged in) customers on product as well as collection pages.

Hide Price in Frontend

Steps to Hide Price Until Login Using Shopify App

Step 1: Install and Enable Hiding Price

Install the MIT Request a Quote app from the Shopify App Store and open the app dashboard. In the Pricing Display Rules, check Enable Price Hiding to activate the price hiding functionality across your storefront.

Step 2: Configure Hide Price Rules

Under the Hide Price Rules section, choose your page targeting:

  • Hides prices across your entire store
  • Only on individual product pages
  • Only on collection/listing pages

Then under Target Products & Collections, select whether you want to hide prices on all products or limit it to specific products or collections.

Set the hide price rules from the app dashboard

Step 3: Set Customer Visibility

Under the Customer Visibility section, select Guest Customers Only so that only logged-out visitors see hidden prices.

Select guest customers field in the app dashboard

Logged-in customers will still see pricing normally. 

In the Hidden Elements section, choose whether to also hide the Add to Cart button, the Buy Now button, or both alongside the price.

Then, save the settings and view your frontend. The pricing and cart buttons are hidden. 

Shopify login to see price feature in the frontend

Advanced Funcationality  

Instead of the “Login to View Price” message, you can capture quality leads by showing a Request a Quote button.

Enable the Show Quote Button under Button Customization and add customizations as needed. This replaces the hidden price with a clean, professional call-to-action button.

Button customization in Shopify

Once configured, save your settings and test your storefront as a guest; prices will be hidden and your custom button will appear in their place with an in-built form for the shoppers to fill.

Request a quote button in Shopify

Why this helps: 

  • Gain deeper insights into which products are driving the most professional interest.
  • You build a high-quality email list of serious buyers who are interested in your specific pricing.
  • Show retail prices to the public while keeping your competitive wholesale rates hidden behind a login or a quote request.
Quote & Hide Price App

Hide the price within a few configurations—zero coding Shopify app.

Install Now
MIT Request Quote & Hide Price App

Make Your Shopify Product Shareable 

The above login to see price in Shopify encourages guest visitors to create an account with your store to view pricing; this way, you can keep engaging with them whenever needed.

Another way to engage is by adding a WhatsApp share button to Shopify.

Your customers can share their favourite products from the store with their friends and family — maximizing your brand awareness. 

Sanjay Jethva

Article by

Sanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for...