How to know in liquid when a user is logged-in on Thank-you page?

New Member
1 0 1

We want to customize the order details in the thank-you page but we want to show certain information only when the user has authenticated with the email and the order number. We haven't found a way to know from liquid this. We tried the {% if customer %} check but it is always true. Is there a way to achive it?

Note: we are using Shopify-Plus

1 Like
Tourist
49 0 2

Hi, did you solved this maybe? I know it might be solved with javascript, but maybe there is liquid solution?

0 Likes
New Member
2 0 0

{% if customer %}

Worked for me... I found the objects in the cheatsheet really helpful... 

As well as this doc

https://help.shopify.com/en/themes/development/templates/customers-login

0 Likes
Tourist
8 0 0

This works for me 

{% if customer.id == null %}
Your stuff here
{% endif %}

 

0 Likes