Display text block on product page only for logged out customers

Baggio
Shopify Partner
5 0 1

I have this Online Store 2.0 supporting theme and I have added a text block to product page that should only be visible to logged out (guest) customers. 

 

I found this code:

{% if shop.customer_accounts_enabled %}
  {% if customer %}

  {% else %}
    HERE GOES TEXT BLOCK

  {% endif %}
{% endif %}

I was wondering what how exactly should I use this code and in what file, or do you have other suggestions of how to achieve this?

Reply 1 (1)
techlyser_web
Shopify Partner
535 119 126
{% if shop.customer_accounts_enabled %}
  {% if customer %}

{% if template == 'product' %} {% else %} HERE GOES TEXT BLOCK
{% endif %} {% endif %} {% endif %}

Techlyser || Shopify Partner || Helping eCommerce Brands
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com