menu

Magento Get Customer Details


Magento Get Customer Details : If you are working with magento you often need to work with customer related module and you need to get/set customer data. You can get customer information using the model customer/customer. You can get or set the customer data using this model. Here we are going to explain how to get customer data in magento using customer id or customer session.


Magento Get Customer Details

Here is the detail which you can access using the customer model. Lets go in detail step by step –

Magento Get Customer Id From Session

Here is syntax for getting customer id from customer session-

Magento Get Customer Id From Session

Which will give you the customer id.

Magento Get Customer data from customer Id

Here is syntax for getting customer data from customer id –

Magento load customer data from customer Id

Which will load the customer data for the customer id 10.

Now Let’s go and get data loaded from the magento.

Magento Get Customer Name

You can get customer first and last name as below –

Magento load customer data from customer Id

Which will give you customer’s name.

Magento Get Customer Group Id

You can get customer group id as below –

Magento get customer group id

Which will give you customer’s group id.

Magento Get Customer Email Id

You can get customer email id as below –

Magento get customer email id

Which will give you customer’s email.

Magento Get Customer Address Detail

You can get customer Address Detail such as below –

  • First Name
  • Last Name
  • Company
  • Post Code
  • City
  • Street
  • Telephone
  • Fax
  • Country

Magento get customer Address Detail

Which will give you customer’s email.

📖 Read More


Advertisements