The customer object contains information about a customer who has a customer account.

Where and when is it defined

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. You can verify if a customer is logged-in with this code:

{% if customer %}
  Customer is logged in. You can access the customer
  attributes such as {{ customer.first_name }}.
{% endif %}


Returns the email address of the customer.

Returns the id of the customer.

Returns the full name of the customer.