Get Customer Details using Email Id – Magento

Get Customer Details using Email Id – Magento

In this post we will show you how to Get Customer Details using Email Id in Magento. we will give you top for get Customer Details using Email Id.

For Get Customer Details using Email Id – Magento

  • If we have email id of customer and we need to get details of customer
  • This code will return customer object details and detail
<?php
    // Get Customer Details using Email Id 
    // add custome email id 
    $customerEmail = "ingo@onlinecode";
    $_customer = Mage::getModel("customer/customer");
    $_customer->setWebsiteId(Mage::app()->getWebsite()->getId());
    // load customer by email id
    $_customer->loadByEmail($customerEmail); 
			
    // remove comments for display all detail of Customer
    // echo "<pre>";
    // print_r($_customer);
    // echo "</pre>";
 
    // basic detail of customer
    $_customer->getPrefix();
	// customer Full Name
    $_customer->getName(); 
	// customer First Name
    $_customer->getFirstname(); 
	// customer Middle Name
    $_customer->getMiddlename(); 
	// customer Last Name
    $_customer->getLastname(); 
    $_customer->getSuffix(); 
    // customer other customer detail
	// get customer ID of website/store
    $_customer->getWebsiteId(); 
	// get customer Entity Id
    $_customer->getEntityId(); 
	// get customer Entity Type Id
    $_customer->getEntityTypeId(); 
	// get customer Attribute Set Id
    $_customer->getAttributeSetId(); 
	// get customer email Id
    $_customer->getEmail(); 
	// get customer Group Id
    $_customer->getGroupId();
	// get customer Store Id
    $_customer->getStoreId(); 
	// get customer created time
    $_customer->getCreatedAt(); 
	// get customer Update time
	// yyyy-mm-dd hh:mm:ss
    $_customer->getUpdatedAt();
	// customer is active 1 or 0(not active)	
    $_customer->getIsActive(); //
    $_customer->getDisableAutoGroupChange();
    $_customer->getTaxvat();
    $_customer->getPasswordHash();
	// Admin 
    $_customer->getCreatedIn(); 
	// get customer Gender
    $_customer->getGender(); 
    $_customer->getDefaultBilling(); // ID
    $_customer->getDefaultShipping(); // ID
	// get customer Dob (yyyy-mm-dd hh:mm:ss)
	// get customer dob
    $_customer->getDob(); 
	// ID customer Tax Class 
    $_customer->getTaxClassId();

You also like Get Order Details using Order and customer registration programmatically and Magento2 admin login user detail and Magento 2 Featured products

Leave a Comment

Your email address will not be published. Required fields are marked *

88  +    =  94

We accept paid advance and paid guest Posting on our Site : Contact US