Display Customer Name in Customer Account page

Topic summary

A user encountered an issue where {{ 'customer.first_name' }} displayed the literal string “First name” instead of the actual customer name on a customized Shopify Customer Account page.

Solution provided:

  • Remove 'account' from the object reference
  • Remove the 't' translation filter
  • Remove quotation marks around the variable
  • Correct syntax: {{ customer.first_name }}

Resolution: The issue was resolved after implementing these changes. The problem stemmed from using translation syntax for a customer object property, which prevented the dynamic value from rendering correctly.

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

I am customising the Customer Account page in my Shopify store. I am replacing the standard ‘Account Details’ with my own details. I am using {{ ‘customer.first_name’ }} but instead of displaying my name it is displaying a literal string ‘First name’ how can I fix this? Please see attached code and attached screenshot of issue.

<h2>{{ 'customer.account.details' | t }}</h2>

      <p>
        {{ 'customer.account.first_name' | t }}
        {{ 'customer.account.last_name' | t }}
      </p>

      {{ customer.default_address | format_address }}

According to the shopify documentation you sould use {{ ‘customer.first_name’ }} - remove the ‘account’ and the ‘t’ filter, because you can’t translate the customer’s name

Liquid objects: customer (shopify.dev)

Amazing, thank you @miguel_liquify ! I also had to remove the quotation marks now it works! Thank you for your help! :slightly_smiling_face:

1 Like