- If we have customer email id and we need to get customer details,
- The following code will return customer object details,
- The following code will return customer object details,
<?php $customer_email = "customer@example.com"; $customer = Mage::getModel("customer/customer"); $customer->setWebsiteId(Mage::app()->getWebsite()->getId()); $customer->loadByEmail($customer_email); //load customer by email id //use echo $customer->getId(); echo $customer->getFirstName(); //print_r($customer->getData()); to find all the available elements.?>
This comment has been removed by the author.
ReplyDelete