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

Solved

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

zeytincim
Visitor
2 0 0

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

Accepted Solution (1)

Promer-Alena
Shopify Partner
250 26 104

This is an accepted solution.

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.

View solution in original post

Replies 2 (2)

Promer-Alena
Shopify Partner
250 26 104

This is an accepted solution.

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.

zeytincim
Visitor
2 0 0

Thank you for the information.

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