Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Display text block on product page only for logged out customers

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)

niraj_patel
Shopify Partner
2378 514 507
{% if shop.customer_accounts_enabled %}
  {% if customer %}

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

Shopify Partner || Helping eCommerce Stores
- 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