Hide Price until Customer log in

Solved
Highlighted
New Member
7 0 0

i wanna hide price and only those who log in can see it..


@Jasoliya wrote:

Add "hide_price" tag in product and then add bellow code in section->product-template.file where price snippet include 

{% assign check_item='false' %}
{% for tag in product.tags %}
     {% if tag  contains 'hide_price' %}     
            {% assign check_item='true' %} 
     {% endif %}
  {% endfor %}

  {% if check_item=='true' %}
  //hide price
  {% else %}
  //show your price
  {% endif%}
  

 

0 Likes
Highlighted
Shopify Expert
3444 541 813

then place code in side this condition:

{% if customer %}
//login
{% else %}
//not login
{% endif %}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
3 0 0

Please help with this code...should i add this 

{% if customer %}
//login
{% else %}
//not login
{% endif %}

and then this....

{% assign check_item='false' %}
{% for tag in product.tags %}
     {% if tag  contains 'hide_price' %}     
            {% assign check_item='true' %} 
     {% endif %}
  {% endfor %}

  {% if check_item=='true' %}
  //hide price
  {% else %}
  //show your price
  {% endif%}

what code should be inside what code?...and what current code gets replaced?

Thanks
0 Likes
Highlighted
Shopify Expert
3444 541 813

If you want to show price only when user login then you have to code like that:

{% if customer %}
//login
{% else %}
//not login
{% endif %}

Here withing this condition you can put your price and in else condition put any msg that you want to show without login. 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
3 0 0

still lost...am sorry..but in between which lines will i add this code...and is it only this template but also snippets?

Screenshot_1.png

0 Likes
Highlighted
Shopify Expert
3444 541 813

That i told you have to find your price in product-grid snippet and product-template section and add price code within this condition so user can only see price if log in.

As this thing cant be done at this points you have to manage such more thing too. its not just simple task to complete in one step. but you can hide it by this step. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Excursionist
60 0 0

Hi dear, let's check this wonderful app to replace your product prices with contact us form and call for a price.  Admin can create custom hide price rules and attach them to customer types and specific products. Shopify hide price app enables you to customize its button label, font color, form label, and fields. a503c08616fb9c42b7e9c2b0dcff2e88.png

 

 

0 Likes