Do you want to hide product prices on your Shopify store until customers log in? Perhaps you’re running a wholesale store, a B2B business, or a members-only shopping website where visitors must sign in before viewing prices.
The good news is that you can customize the Shopify Dawn theme using Liquid code without installing a paid app.
In this tutorial, I’ll show you how to display a “Login to View Price” link instead of product prices, hide Add to Cart buttons for guest visitors, and automatically restore the normal shopping experience when customers log in.
What you’ll learn:
- Hide product prices from customers who aren’t logged in.
- Display a Login to View Price button.
- Hide Add to Cart and Buy Now buttons for guests.
- Disable product-card Quick Add functionality for guests.
- Apply the changes to Shopify Dawn theme.
- Test the customization without affecting your live store.
Theme used: Shopify Dawn 16
Coding language: Shopify Liquid
Paid app required: No
Difficulty: Beginner to Intermediate
How Does Hide Price Until Login Work?
Shopify Liquid provides a built-in customer object that allows theme developers to check whether a customer is logged in.
When a customer is logged in, the customer object is available. Otherwise, its value is nil.
We can use this condition to show different storefront content.
{% if customer %}
<p>Welcome! You can view product prices.</p>
{% else %}
<p>Please log in to view prices.</p>
{% endif %}Here’s the expected behavior:
| Store Visitor | Product Price | Add to Cart |
|---|---|---|
| Guest visitor | Login to View Price | Hidden |
| Logged-in customer | Visible | Visible |
This approach works with Shopify’s customer account system. However, it only controls what your theme displays. It does not make Shopify product prices confidential at the platform or API level.
Step 1: Duplicate Your Shopify Theme
Before editing any Liquid files, create a backup of your active Shopify theme.
- Log in to your Shopify Admin.
- Navigate to Online Store → Themes.
- Find your active Dawn theme.
- Open the three-dot menu.
- Select Duplicate.
- Edit the duplicated theme rather than your live theme.
This ensures you can test the customization before publishing it.
Step 2: Hide Product Prices in Dawn Theme
First, we’ll modify the Shopify Dawn price snippet.
Go to Online Store → Themes → Edit Code.
Open:
snippets/price.liquid
This file is responsible for rendering regular prices, sale prices, compare-at prices, and other price information in several storefront components.
Add the Customer Login Condition
At the beginning of price.liquid, immediately after the existing opening comment block and before the first {%- liquid block, add:
{% if customer %}Now scroll to the very bottom of the same file.
After the existing final {% endunless %}, add:
{% else %}
{% unless placeholder %}
<div class="price">
<a
href="{{ routes.account_login_url }}"
class="link underlined-link"
>
Login to View Price
</a>
</div>
{% endunless %}
{% endif %}What does this code do?
If a customer is logged in, Shopify executes the original Dawn price-rendering code.
If a visitor is not logged in, the theme displays a Login to View Price link instead.
The unless placeholder condition avoids displaying a login prompt for placeholder products.
Important: Keep the original price snippet intact between the opening {% if customer %} and closing {% else %}. Do not remove Dawn’s existing pricing logic.
Step 3: Hide Add to Cart and Buy Now Buttons
Hiding the product price alone isn’t enough. Guest visitors may still see Add to Cart or Buy Now buttons.
To change this behavior, open:
snippets/buy-buttons.liquid
Find the opening comment block at the top of the file.
Immediately after the comment block and before the main <div {{ block.shopify_attributes }}>, add:
{% if customer %}Next, scroll to the very end of the file, after the original closing </div>.
Add:
{% else %}
<div {{ block.shopify_attributes }}>
<a
href="{{ routes.account_login_url }}"
class="button button--full-width button--secondary"
>
Login to Purchase
</a>
</div>
{% endif %}How It Works
For logged-in customers, the existing Dawn product form, Add to Cart button, and dynamic checkout button remain available.
For guest visitors, the product form is replaced with a Login to Purchase button.
Because we’re wrapping the existing functionality instead of deleting it, the original purchasing experience remains available after login.
Step 4: Hide Quick Add Buttons on Collection Pages
Dawn includes Quick Add functionality that lets customers add products to their cart directly from collection pages and featured product grids.
We need to prevent guest visitors from accessing those purchase controls.
Open:
snippets/card-product.liquid
Update the Standard Quick Add Condition
Find:
{% if quick_add == 'standard' %}Replace it with:
{% if customer and quick_add == 'standard' %}Update the Bulk Quick Add Condition
Next, find:
{% elsif quick_add == 'bulk' %}Replace it with:
{% elsif customer and quick_add == 'bulk' %}These two modifications stop Dawn’s standard and bulk Quick Add branches from rendering for guest visitors.
Note: Dawn also contains quantity-break and volume-pricing elements in product cards. If your store uses volume pricing, inspect those components separately because they can display prices outside the standard price snippet.
Step 5: Hide Additional Price Information on the Product Page
Dawn can display additional pricing details such as payment installments and volume discounts.
These need attention if your goal is to hide all visible price information.
Open:
sections/main-product.liquid
Hide Payment Installment Information
Find the following existing code inside the product price block:
<div {{ block.shopify_attributes }}>
{%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%}
{%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%}
<input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}">
{{ form | payment_terms }}
{%- endform -%}
</div>Wrap it with a customer login condition:
{% if customer %}
<div {{ block.shopify_attributes }}>
{%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%}
{%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%}
<input
type="hidden"
name="id"
value="{{ product.selected_or_first_available_variant.id }}"
>
{{ form | payment_terms }}
{%- endform -%}
</div>
{% endif %}This hides installment information from guests.
Hide Volume Pricing
In the same file, find:
{%- if product.quantity_price_breaks_configured? -%}
<volume-pricingInside the product quantity block, update the condition to:
{%- if customer and product.quantity_price_breaks_configured? -%}
<volume-pricingKeep the remaining original volume-pricing markup unchanged.
This prevents that particular product-page volume-pricing table from rendering for guests.
Dawn may also expose volume prices in quantity popovers, Quick Order Lists, or other templates. Review those separately before claiming your entire storefront hides all prices.
Step 6: Test the Customer Login Functionality
Now preview your duplicated Shopify theme.
Test as a Guest
Open the storefront in a private or incognito browser window.
Check whether:
- Product prices are replaced by Login to View Price.
- Product Add to Cart buttons are hidden.
- Dynamic checkout buttons are hidden.
- Collection Quick Add buttons are unavailable.
- The login links open the customer login page.
Test as a Logged-in Customer
Sign in using a valid customer account.
Verify that:
- Product prices display correctly.
- Sale and compare-at prices work.
- Add to Cart functions normally.
- Buy Now works.
- Collection Quick Add works.
- Product variants update correctly.
- Quantity discounts display when applicable.
Also test desktop and mobile layouts.
Additional testing: Check cart pages, cart drawers, search results, product recommendations, Quick Order Lists, and any third-party app widgets. These may contain independent price or purchase controls not covered by the code above.
Step 7: Publish Your Customized Theme
After completing the necessary tests:
- Return to Shopify Admin.
- Open Online Store → Themes.
- Preview the duplicated theme.
- Confirm the guest and logged-in experiences.
- Publish the theme only after all relevant functionality has been verified.
Keep your original theme available as a backup.
Can Customers Still Access Prices Without Logging In?
Yes, potentially.
This is an important limitation of Liquid-based price hiding.
Shopify product prices can be available through storefront product JSON endpoints, structured data, JavaScript, cart responses, and other platform functionality.
Therefore, the code in this tutorial is a theme-level display customization, not a secure wholesale pricing system.
If you need genuinely restricted B2B pricing, use a solution that enforces customer eligibility and pricing rules beyond the theme, such as appropriate Shopify B2B features or a compatible access-control application.
Benefits of Hiding Shopify Product Prices Until Login
1. Encourage Customer Registration
Requiring customers to log in before viewing prices can encourage account creation, although it may also discourage casual shoppers.
2. Create a Members-Only Shopping Experience
You can make your storefront feel more exclusive by displaying prices only to signed-in members.
3. Customize Wholesale Storefronts
For businesses that want a login-first shopping experience, this can be a useful visual customization. It should not be relied on to secure wholesale prices.
4. Avoid Monthly App Fees for Basic Display Changes
If your requirement is simply to change the storefront interface, Shopify Liquid can handle the basic customization without a subscription app.
Frequently Asked Questions
Can I hide Shopify product prices without an app?
Yes. You can use Shopify Liquid to conditionally hide prices in your theme. However, Liquid alone cannot securely prevent all access to price data.
Does this method work with Shopify Dawn theme?
Yes. The examples in this tutorial are based on the structure of Dawn version 16. Other Dawn versions may require adjustments.
Can customers add products to the cart without logging in?
The tutorial hides the normal product-page and collection-card purchase controls for guests. It does not block direct Cart API requests or guarantee that checkout is inaccessible.
Will product prices appear automatically after login?
Yes. When a logged-in customer loads the storefront, Liquid evaluates the customer condition and renders the original price markup.
Does this customization affect Shopify SEO?
It can. Search engines may still discover prices through structured data or other publicly accessible sources. Hiding visible prices can also affect user experience and conversion rates. Test the storefront carefully and keep structured data accurate.
Can I use this code with other Shopify themes?
The customer login condition is standard Shopify Liquid, but the exact files and code placement depend on the theme. The instructions here are specifically designed around Dawn 16.
Watch the Video Tutorial
Prefer learning visually? Watch my step-by-step Shopify tutorial to understand how the customization works.
Video: How to Hide Shopify Product Prices Until Customer Login
Embed your YouTube tutorial here.
Final Thoughts
Hiding Shopify product prices until customers log in is a useful customization for membership-style stores and login-first shopping experiences.
By editing Dawn’s price snippet, buy-buttons snippet, product-card Quick Add conditions, and relevant product-page pricing elements, you can create a more controlled storefront interface without installing a paid app.
Remember that this approach only changes the theme’s display behavior. For secure customer-specific pricing, additional platform-level controls are required.
If you need professional Shopify theme customization, store development, or ecommerce automation services, visit eCommerce Thesis.
You can also explore more Shopify development, SEO, and ecommerce automation tutorials on our website.
Author: Foysal Ahmed
Shopify Developer | eCommerce Thesis