Customer

Check if Logged In

Checks if a customer is currently logged into their account.

Copy or embed this snippet

{% if customer %}
  Welcome back, {{ customer.first_name }}!
  <a href="{{ routes.account_url }}">My Account</a>
{% else %}
  <a href="{{ routes.account_login_url }}">Log In</a>
{% endif %}

Embed this snippet on your blog or docs — attribution link appreciated: HTMLToLiquid Converter · Convert to Shopify section →

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML