Hiding product prices is a common practice in eCommerce, especially for B2B businesses. This is because it can help to protect pricing strategies and secure wholesale prices. Also some businesses may choose to hide product prices in order to turn their online store into a product catalog. Or to require a quotation prior to complete purchases.
Many of these scenarios call for prices to be shown only to registered users. We wanted to provide you with this simple code solution that allows you to hide prices and cart actions from unlogged users. You can apply directly in your theme files and should work in most of them. No need of an app, just a minimal technical knowledge and having Shopify Customer Accounts enabled.
Hiding prices and restricting account creation are two features that go hand-in-hand. They are often used together to make sure that only authorized customers can create accounts or make purchases. Shopify does not offer these features natively, but our Custom Forms plugin does.
With our Account Approval feature, customers will submit an account application instead of registering directly on your store. The application will need to be reviewed and approved (or rejected) by a shop admin before the customer can create an account. The application form can also be used to collect additional information. Information that you may require from customers before they can create an account, such as tax details or addresses. This allows you to have more control over who has access to your store.
If you are interested in using our Account Approval feature, please visit this link to learn more about the Custom Forms plugin, or just contact us.
You don't need an app. You only need to have Customer Accounts enabled in Shopify. We also recommend using Classic Customer Accounts instead of New Customer Accounts. As Classic will handle customer status on-site cookies better. More information here.
Yes, there is. In this case you can do it directly from the Shopify Currency settings. You can find more instructions in this Shopify article.
Yes, you can. You would only need to add a conditional to identify products, instead of (or in addition to) the customer login status conditional. For example, to find a particular product, you would write {% if product.handle == "yourproducthandle" %}. Where yourproducthandle needs to be replaced with the correct product handle.
Yes, unfortunately, not all themes use these elements, but we believe that most of them do at this time. Custom or paid themes can use elements with different names, or have different snippets to code prices on different pages. In this case, if you are not familiar with HTML code, it is perhaps better to consult with a developer to implement this solution.
Yes, we think this is a simple solution that should work in most cases. A better solution would be to locate the Add To Cart forms and wrap them in a similar condition {% if customer %}. However, these elements usually do not have their own snippet, so they are more difficult to locate. They are usually in the product template next to the prices. If you can locate the element, you can wrap it in the condition, and this would be a cleaner solution.
I'd like to hide also product quantity or other elements while the customer is unlogged
You can do this. Just add the elements to the <style> rule in the code preceded by commas. For example let's say that quantity is in a class "product-form__quantity". Then the code would be:
<style>form[data-type="add-to-cart-form"], .product-form__quantity { display: none !important; }</style>
Your fix is not hiding all of my prices
Yes, unfortunately, we cannot guarantee that this simple code solution will work in every circumstance. In complex themes (like paid ones with many features) or in cases where you are using apps that could be adding price snippets (like Subscription apps), the solution may not work. If you cannot locate all price elements in your theme, it is possible to apply a CSS solution. In this case, you need to identify the selectors that contain the prices first, then write down the CSS rule and wrap it in the conditional:
Hiding product prices on Shopify can be beneficial for a number of reasons, especially for B2B businesses.