$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$customer_email=$_REQUEST['list'];
///echo $customer_email;exit;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$url = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $url->get('\Magento\Store\Model\StoreManagerInterface');
$state = $objectManager->get('\Magento\Framework\App\State');
$state->setAreaCode('frontend');
$websiteId = $storeManager->getWebsite()->getWebsiteId();
// Get Store ID
$store = $storeManager->getStore();
$storeId = $store->getStoreId();
$customerFactory = $objectManager->get('\Magento\Customer\Model\CustomerFactory');
$customer=$customerFactory->create();
$customer->setWebsiteId($websiteId);
$customer->loadByEmail($customer_email);// load customer by email address
//echo $customer->getEntityId();
//$customer->load('1');// load customer by email address
$data= $customer->getData();
$customer_id=$data['entity_id'];
$objectManager = $bootstrap->getObjectManager();
$customer_email=$_REQUEST['list'];
///echo $customer_email;exit;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$url = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $url->get('\Magento\Store\Model\StoreManagerInterface');
$state = $objectManager->get('\Magento\Framework\App\State');
$state->setAreaCode('frontend');
$websiteId = $storeManager->getWebsite()->getWebsiteId();
// Get Store ID
$store = $storeManager->getStore();
$storeId = $store->getStoreId();
$customerFactory = $objectManager->get('\Magento\Customer\Model\CustomerFactory');
$customer=$customerFactory->create();
$customer->setWebsiteId($websiteId);
$customer->loadByEmail($customer_email);// load customer by email address
//echo $customer->getEntityId();
//$customer->load('1');// load customer by email address
$data= $customer->getData();
$customer_id=$data['entity_id'];
ReplyDeletenice post -
Get Customer Details using Email using Magento
ReplyDeletei love reading this article so beautiful!!great job!
ReplyDeletenewizze
Thanks
ReplyDeleteThanks
ReplyDelete