Hi everyone, I’m trying to hide prices for visitors who aren’t logged in, and only show the price to customers who are logged in or tagged. I’ve read a few tutorials and even tried some theme edits, but I still can’t get it to work — guests can still see the price, and sometimes the “Request a Quote” button doesn’t appear at all. Is there a beginner-friendly way to set this up properly? Maybe I’m missing a small detail somewhere. Any help or clear steps would be really appreciated!
@Hunthemoney did you try {% if customer %} in your price snippet?
Hi @Hunthemoney
Try this code.
{% if customer %}
{{ card_product.price | money }}
{% else %}
<span class="login-for-price">Login to See Price</span>
{% endif %}
Best regards,
Devcoder ![]()
Could you share your store URL?
Hi, @Hunthemoney
Which theme are you using for your store?
You should try the Hide Payment & Shipping iWeb app. It will allow you to hide prices on your store. Do give it a try.
Hi @Hunthemoney ,
Hide price unless customer is logged in
1. Edit the product card file (for Collection/Search pages)
Go to:
Online Store → Themes → Edit code
Open:
snippets/card-product.liquid
Find the price render:
{%- render 'price', product: product, price_class: 'price--large' -%}
Replace it with:
{% if customer %}
{%- render 'price', product: product, price_class: 'price--large' -%}
{% else %}
<button class="button button--secondary" onclick="window.location.href='/account/login'">
Login to view price
</button>
{% endif %}
2. Edit the main product page
Open:
sections/main-product.liquid (or main-product.liquid depending on theme)
Find the price block:
{{ product.price | money }}
or
{%- render 'price', product: product -%}
Replace with:
{% if customer %}
{%- render 'price', product: product -%}
{% else %}
<button class="button button--secondary" onclick="window.location.href='/account/login'">
Login to view price
</button>
{% endif %}
There is no simple fix.
Also you may need to consider that you would have SEO problems with products without price.
Also, if you have a price set on your product, then it is possible to see it by visiting
yoursite.com/products/product-handle.js or yoursite.com/products/product-handle.json