How can we show {{ customer.full_name }} in custom page?

Topic summary

A user wants to display customer details (name, shipping address, phone, email) using Liquid variables like {{ customer.full_name }} on a custom “Sale Policy” page that customers must accept before purchase, but the variables aren’t rendering.

Key Issue:
Shopify’s Liquid code doesn’t display customer-specific data on public pages for security reasons—it only works when customers are logged in and viewing account-specific pages.

Suggested Solution:

  • Place the content within the customer account area (e.g., customers/account.liquid or a login-required custom page)
  • Wrap the code in {% if customer %} ... {% endif %} to ensure it displays only for logged-in users

Status: The original poster is now asking how to implement this solution in a custom page’s HTML code section. The discussion remains open with implementation details pending.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hello,

I have a page called Sale Policy. Before purchase customers must read and accept this policy.

I want to add customer details in it. I try to add customer information as;

Customer Name: {{ customer.full_name }}

Shipping Adres: {{ shipping_address.address1 }}

Phone: {{ customer.phone }}

E-Mail: {{ customer.email }}

but it is not showing them. Is there a way to show those information?

Thanks

I hope this can help you

Shopify’s liquid code won’t display customer-specific details on a standard page unless the customer is logged in and viewing a page within their account. For security reasons, Shopify doesn’t allow dynamic customer data to be shown on public pages.

A workaround is to place this content inside the customer account area, like in customers/account.liquid or a custom page that requires login. You can wrap your code in {% if customer %} … {% endif %} to ensure it only appears when a customer is logged in.

Thank you for the information.

How can we apply this to custom page html code section?