All things Shopify and commerce
I'm trying to use customer.first_name on the Subject section but I couldn't find a way to do it. You guys can help me out on that? Thanks
Hi @fsebastiao
Hope you're having a great day!
As specified here by Shopify:
The customer object is global in the sense that you can access it in all layout, template, and snippet files. However, the object is only defined when a customer is logged in.
{% if shop.customer_accounts_enabled %}
{% if customer %}
Customer is logged in. You can access the customer attributes such as {{ customer.first_name }}.
{% else %}
{{ 'Log in' | customer_login_link }}
{% if shop.customer_accounts_optional %}
{{ 'Create an account' | customer_register_link }}
{% endif %}
{% endif %}
{% endif %}
If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024