How to hide prices unless customer is logged in?

Tourist
6 0 1

I am trying to create a wholesale site where customer can navigate my site, see products, but not be able to see pricing or add to cart button unless logged in.

0 Likes
Shopify Staff
Shopify Staff
88 10 16

Hi, there!

 

Emma here from Shopify. Happy to help you out with this today.

 

It sounds like what you're wanting to accomplish with your store can be set up with the use of an app such as Locksmith.

 

The Locksmith app developers have created a "simple yet powerful tool to help you make sure the right people see the right things in your Shopify store"

 

Among other features included with this app, you can use "Locks" to restrict access to:

 

  • Your entire shop
  • Pages
  • Products
  • Collections
  • Prices
  • The shopping cart
  • The login page
  • The registration page, and
  • Product variants

 

The app includes a 15-day free trial, so I'd recommend giving that a try to see if it will work well for your business. So long as the app is removed within the trial period, there would be no charges on your account. 

 

Let us know how you make out!

 

Emma | Shopify Support

 

-Emma- | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Tourist
6 0 1
Is there a solution where I don't have to pay?  I'm looking to switch to Shopify from another platform, but my other platform does not charge me for this feature.  I can simply turn on member prices or shut it off.
0 Likes
Shopify Staff
Shopify Staff
88 10 16

We do have an enterprise level plan - Shopify Plus - which includes a wholesale channel. Let me know if you'd be interested in hearing more about this option, and I'd be happy to set up a conversation for you! 

Otherwise, the only option would be using an app like the one I mentioned earlier. If you'd like, I can pass your feedback along to our development team about having wholesale options included with all plan levels. We are always looking for ways to improve Shopify, and truly value your feedback! 

Emma | Shopify Support

-Emma- | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Tourist
6 0 1

I found a solution.

 

Went to theme > Edit Code > Sections > product-template.liquid 

Once on the template hit CTRL F to access the find option and look for: product_price

Added the following code in Red Bold to hide price

 

{% if customer %}
<div class="product__price">
{% include 'product-price', variant: current_variant %}
</div>
{% else %}
<b>Our Price:</b> (Dealers Only)
{% endif %}

 

You can change <b>Our Price:<b> (Dealers Only) to what ever you'd like to substitute the price with.

 

To hide the add to cart button I did the following:

On the same template hit CTRL F to access the find option and look for: addtocart

Added the following code in Red Bold to hide price

 

{% if customer %}
<div class="product-form__item product-form__item--submit{% if section.settings.enable_payment_button %} product-form__item--payment-button{% endif %}{% if product.has_only_default_variant %} product-form__item--no-variants{% endif %}">
<button type="submit" name="add" id="AddToCart-{{ section.id }}" {% unless current_variant.available %}disabled="disabled"{% endunless %} class="btn product-form__cart-submit{% if section.settings.enable_payment_button %} btn--secondary-accent{% endif %}">
<span id="AddToCartText-{{ section.id }}">
{% unless current_variant.available %}
{{ 'products.product.sold_out' | t }}
{% else %}
{{ 'products.product.add_to_cart' | t }}
{% endunless %}
</span>
</button>
{% if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
{% endif %}
</div>
{% endform %}

 

 

0 Likes
Shopify Staff
Shopify Staff
88 10 16

Excellent! I'm glad you've found something that works for you. 

Wishing you much success with your business, 

Emma | Shopify Support 

-Emma- | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
New Member
1 0 0

Hi, 

 

Thanks for sharing your solution. What did you do for the membership side of things? For people to apply to be members?

 

Thanks again

0 Likes