Can you hide product prices until login for wholesale?

Solved

Can you hide product prices until login for wholesale?

AquaLabs
Excursionist
33 0 6

Hi,

 

Is it possible to hide product prices until a customer logs in? I have been told a paid app is required but surely there is a work around?

 

I need to do this for wholesale purposes

Accepted Solutions (2)

PageFly-Noah
Shopify Partner
1317 233 273

This is an accepted solution.

Hi @AquaLabs 

 

This is Noah from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

{% if customer  %}
<style>
.price  {
display: block !important
}
</style>
{% else %}
<style>

.price  {
display: none !important
}
 </style>
{% endif %}

 

Hope this can help you solve the issue 

 

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

PageFly-Noah
Shopify Partner
1317 233 273

This is an accepted solution.

You can enable it in your Shopify Setting account.

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 9 (9)

PageFly-Noah
Shopify Partner
1317 233 273

This is an accepted solution.

Hi @AquaLabs 

 

This is Noah from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

{% if customer  %}
<style>
.price  {
display: block !important
}
</style>
{% else %}
<style>

.price  {
display: none !important
}
 </style>
{% endif %}

 

Hope this can help you solve the issue 

 

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

AquaLabs
Excursionist
33 0 6

thanks that worked perfectly.

Now, i seem to be missing the customer login section? How can I add the button for customers to login and see prices?

AquaLabs
Excursionist
33 0 6

oh actually i realised it does not work because the customer can still add the product to cart and see the price there. 

Can it be changed so that the customer cannot add to cart unless they are logged in?

 

PageFly-Noah
Shopify Partner
1317 233 273

Hi please replace the code above with this one, it will also hide the add to cart button too.

{% if customer  %}
<style>
.price , .product-form {
display: block !important
}
</style>
{% else %}
<style>

.price ,.product-form  {
display: none !important
}
 </style>
{% endif %}

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

AquaLabs
Excursionist
33 0 6

thanks. How do i add a button for a customer to log into their account?

 

PageFly-Noah
Shopify Partner
1317 233 273

This is an accepted solution.

You can enable it in your Shopify Setting account.

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

AquaLabs
Excursionist
33 0 6

excellent thanks so much!

 

PageFly-Noah
Shopify Partner
1317 233 273

Glad that i can help. Let me know if you have other help

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

magecomp
Shopify Partner
434 29 44

Hello @AquaLabs 

 

Shoplock shopify app is built for your kind of requirements if you want to take a look at it.

Helping voluntarily. Please like and accept the solution if it helps. Thanks!
Our Bestseller Shopify Apps    |      Mobile App Builder by MageComp    |      Shoplock Hide Pages/Collections

Need a developer?  Just visit MageComp website